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 pytest version #1495

Merged
merged 3 commits into from
Jun 18, 2018
Merged

Fix pytest version #1495

merged 3 commits into from
Jun 18, 2018

Conversation

SaptakS
Copy link
Contributor

@SaptakS SaptakS commented Jun 18, 2018

Description

@owocki @leonprou this should fix the travis error in pytest.
@mbeacom review.

Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)
Testing
Refers/Fixes

Fixes #1492
Refs #1491

@ghost ghost assigned SaptakS Jun 18, 2018
@ghost ghost added the in progress label Jun 18, 2018
@codecov
Copy link

codecov bot commented Jun 18, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@3dc8c66). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #1495   +/-   ##
========================================
  Coverage          ?   28.3%           
========================================
  Files             ?     125           
  Lines             ?    9233           
  Branches          ?    1188           
========================================
  Hits              ?    2613           
  Misses            ?    6523           
  Partials          ?      97
Impacted Files Coverage Δ
app/faucet/views.py 28.94% <ø> (ø)

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 3dc8c66...e1be7d1. Read the comment docs.

@SaptakS
Copy link
Contributor Author

SaptakS commented Jun 18, 2018

@mbeacom I am not entirely sure how it was working but I think in latest pytest, they don't allow environment variables to be declared in the setup.cfg. So I modified the commands.

@@ -36,6 +36,7 @@ jobs:
- codecov
env:
- PYTHONPATH="${TRAVIS_BUILD_DIR}/app/"
- DJANGO_SETTINGS_MODULE="app.settings"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Seems so. The environment variable declaration in setup.cfg under tool:pytest seems to not been working most probably in the newer versions. They need the environment variables to be set before the pytest can be run. Without this travis fails.

@@ -1,5 +1,5 @@
-r base.txt
pytest==3.5.0
pytest>3.5.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just pin this to the appropriate version or completely drop the version pinning for pytest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think dropping version pinning is better. Pinning is what caused a problem here. I would have however done >=. But that might not upgrade the package installed because the current 3.5.0 will anyways satisfy.

Copy link
Contributor

@mbeacom mbeacom left a comment

Choose a reason for hiding this comment

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

lgtm :shipit:

@mbeacom mbeacom merged commit f67003a into gitcoinco:master Jun 18, 2018
@ghost ghost removed the in progress label Jun 18, 2018
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.

travis fails with 'The command "pytest -p no:ethereum" exited with 1.'
2 participants