Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test for installing pysnooper #76

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ jobs:
- { stage: lint, python: 3.7, env: TOXENV=pylint }
- { stage: lint, python: 3.7, env: TOXENV=bandit }
- { stage: lint, python: 3.7, env: TOXENV=readme }
- { stage: test, python: 3.7, env: TOKENV=pysnooper }
- { stage: test, python: 3.6, env: TOKENV=pysnooper }
- { stage: test, python: 3.5, env: TOKENV=pysnooper }
- { stage: test, python: 3.4, env: TOKENV=pysnooper }
- { stage: test, python: 2.7, env: TOKENV=pysnooper }
- { stage: test, python: 3.8-dev, env: TOKENV=pysnooper }
- { stage: test, python: pypy2.7-6.0, env: TOKENV=pysnooper }
- { stage: test, python: pypy3.5, env: TOKENV=pysnooper }
Copy link
Collaborator

@bittner bittner Apr 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very verbose.

What if you simply would run your integration test with the [testenv] section? (Then all this would not be needed. Hmm?)


- stage: deploy
install: skip
Expand Down
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ envlist =
flake8
pylint
bandit
pysnooper
py{27,34,35,36,37,38,py,py3}
readme
requirements
Expand All @@ -16,6 +17,7 @@ description = Unit tests
deps =
pytest
python_toolbox
pysnooper
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This installs the latest released version of pysnooper off PyPI. This is most probably not what you want.

Note that pysnooper (off the checked out commit) is already installed by Tox automatically. Try running pysnooper or python -c "import pysnooper; print(pysnooper.__version__)" to prove it.

commands = pytest
setenv =
# until python_toolbox is fixed
Expand Down Expand Up @@ -54,6 +56,13 @@ deps = pip-tools
commands = pip-compile --output-file requirements.txt requirements.in
changedir = {toxinidir}

[testenv:pysnooper]
description = Ensure pip installs pysnooper
deps = pip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to install pip. Replace this by pysnooper if you want to install it off PyPI (that's probably not what you want), or leave it empty.

commands =
pip install pysnooper
pip show pysnooper
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an integration test.

Think: What does this verify? Is the pysnooper code run with it? (It's not.)

Also, installing pysnooper is unneeded, and even if it were you can move it to deps = .


[bandit]
exclude = .tox,build,dist,tests
targets = .
Expand All @@ -63,3 +72,8 @@ exclude = .tox,build,dist,pysnooper.egg-info

[pytest]
addopts = --strict

[pysnooper]
commands =
pip install pysnooper
pip show pysnooper
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unneeded. You can remove it. (Explanation: The [<tool_name>] sections are configuration file sections that the tool reads. I don't think pysnooper reads anything out from tox.ini.)