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

Fix test dependencies #1463

Closed

Conversation

chenjr0719
Copy link
Member

@chenjr0719 chenjr0719 commented Jan 8, 2019

Notice Travis CI did not pass at #1457, and the reason is current version of pytest-cov(2.6.1) use pytest>=3.6 in install _requires(see here). This is conflict with Sanic's test_requires(it use pytest==3.3.2). Set pytest-cov==2.6.0 in test_requires and tox.ini can fix this issue.

BTW, remove pytest==3.3.2 is also a possible solution. But I don't know why use this version in test_requires, any idea?

@codecov
Copy link

codecov bot commented Jan 8, 2019

Codecov Report

Merging #1463 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1463   +/-   ##
=======================================
  Coverage   91.38%   91.38%           
=======================================
  Files          17       17           
  Lines        1718     1718           
  Branches      325      325           
=======================================
  Hits         1570     1570           
  Misses        123      123           
  Partials       25       25

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96af1fe...201eb0e. Read the comment docs.

@harshanarayana
Copy link
Contributor

@chenjr0719 Nice catch.

@yunstanford
Copy link
Member

Thanks for the fix, I've fixed this locally, but didn't push it out. And I'm thinking we should push forward, instead of backpining.

@harshanarayana
Copy link
Contributor

@chenjr0719 Logically speaking, we only need tox in our tests_require in setup.py if you are running tests inside the tox environment. However, if you choose to run the tests outside the tox context, you need the bare minimum requirements in setup.py.

@@ -89,7 +89,7 @@ def open_local(paths, mode="r", encoding="utf8"):
"pytest==3.3.2",
"multidict>=4.0,<5.0",
"gunicorn",
"pytest-cov",
"pytest-cov==2.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Move pytest to the latest version instead maybe?

@chenjr0719
Copy link
Member Author

@yunstanford Agreed, let me see is there any error after remove pinned version of pytest.

@harshanarayana I know, I just make them consistent to make sure this issue will not happen either using tox or outside the tox.

@chenjr0719 chenjr0719 closed this Jan 8, 2019
@chenjr0719 chenjr0719 deleted the fix_pytest_cov_conflict branch January 8, 2019 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants