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

Adds pytest-xdist as dependency #29

Merged
merged 3 commits into from
Oct 15, 2020
Merged

Conversation

sklarsa
Copy link
Contributor

@sklarsa sklarsa commented Sep 25, 2020

I installed pytest-terraform using a fresh poetry environment, ran a simple testing script, and got this output:

file /Users/steven/Library/Caches/pypoetry/virtualenvs/terraform-SLjsQr8Z-py3.7/lib/python3.7/site-packages/pytest_terraform/tf.py, line 373: source code not available
E       fixture 'worker_id' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, role, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

When I remove the worker_id arg, the tests run

@codecov
Copy link

codecov bot commented Sep 25, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #29   +/-   ##
=======================================
  Coverage   92.64%   92.64%           
=======================================
  Files           8        8           
  Lines         462      462           
=======================================
  Hits          428      428           
  Misses         34       34           

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 760efee...fe0b09f. Read the comment docs.

@kapilt
Copy link
Contributor

kapilt commented Sep 25, 2020

do you have pytest-xdist installed and if so what version?

@kapilt
Copy link
Contributor

kapilt commented Sep 25, 2020

we probably need to add pytest-xdist to our requires its currently only setup as a dev-dependency

@sklarsa
Copy link
Contributor Author

sklarsa commented Sep 25, 2020

no did not have pytest-xdist installed

@llavin
Copy link

llavin commented Oct 2, 2020

I had the same experience. Installing python-xdist solved it. Everything was cool after that. Thanks.

@sklarsa sklarsa changed the title Removes errant worker_id argument Adds pytest-xdist as dependency Oct 14, 2020
@sklarsa
Copy link
Contributor Author

sklarsa commented Oct 14, 2020

I just updated this PR to revert the previous change and move pytest-xdist from dev to prod dependencies

Copy link
Contributor

@marcoceppi marcoceppi left a comment

Choose a reason for hiding this comment

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

Thanks for moving this up. Just one request before releasing.

@@ -16,10 +16,10 @@ python = "^3.6"
pytest = "~6.0.0"
jmespath = "^0.10.0"
portalocker = "^1.7.0"
pytest-xdist = ">= 1.31.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we stick with ^1.31.0? That will do >= 1.31.0 but not 2.0 so we don't accidentally break things if upstream changes faster than we're ready.

Copy link
Contributor

Choose a reason for hiding this comment

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

we work on xdist 2.0, and thats already out so we don't want to pin to old versions, we want to catch breakage proactively, we should setup a nightly github action to catch any issues against these pins. the lock file already captures repeatable install per se albeit thats source install.

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'm not sure what you want me to do here, keep the >= or switch to ^?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough. I'll take up an item to expand our testing on latest deps for our installs

@marcoceppi marcoceppi merged commit b6d2395 into cloud-custodian:master Oct 15, 2020
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.

4 participants