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

[develop] Remove pin of pytest library #5587

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

enrico-usai
Copy link
Contributor

We pinned pytest because usage of custom args stopped to work with pytest 3.7.4. At the end it was a configuration issue: we were missing to specify which is the pytest root dir. Adding a [pytest] section in the tox.ini file permits pytest to discover the right root dir and so to use custom arguments.

Tests

Without the pin and before this patch tests were failing with:

ERROR: usage: test_runner.py [options] [file_or_dir] [file_or_dir] [...]
test_runner.py: error: unrecognized arguments: --tests-log-file=/tmp//...eu-west-1.log --output-dir=/tmp/...eu-west-1
    --key-name=... --key-path=...usai-common.pem --stackname-suffix --tests-config-file=/tmp/...tests_config.yaml --regions eu-west-1
    --ami-owner ... --vpc-stack integ-tests-vpc-...-360 --no-delete ...
  inifile: None
  rootdir: .../aws-parallelcluster/tests/integration-tests/tests

Now tests are executed correctly.

References

We pinned pytest because usage of custom args stopped to work with pytest 3.7.4.
At the end it was a configuration issue: we were missing to specify which is the pytest root dir.
Adding a `[pytest]` section in the `tox.ini` file permits pytest to discover the right root dir
and so to use custom arguments.

### Tests

Without the pin and before this patch tests were failing with:
```
ERROR: usage: test_runner.py [options] [file_or_dir] [file_or_dir] [...]
test_runner.py: error: unrecognized arguments: --tests-log-file=/tmp//...eu-west-1.log --output-dir=/tmp/...eu-west-1
    --key-name=... --key-path=...usai-common.pem --stackname-suffix --tests-config-file=/tmp/...tests_config.yaml --regions eu-west-1
    --ami-owner ... --vpc-stack integ-tests-vpc-...-360 --no-delete ...
  inifile: None
  rootdir: .../aws-parallelcluster/tests/integration-tests/tests
```

Now tests are executed correctly.

### References
* pytest-dev/pytest#11134
* https://docs.pytest.org/en/stable/reference/customize.html#finding-the-rootdir

Signed-off-by: Enrico Usai <usai@amazon.com>
@enrico-usai enrico-usai added the skip-changelog-update Disables the check that enforces changelog updates in PRs label Aug 7, 2023
@enrico-usai enrico-usai requested review from a team as code owners August 7, 2023 10:33
@enrico-usai enrico-usai enabled auto-merge (rebase) August 7, 2023 10:35
@enrico-usai enrico-usai merged commit bdcf083 into aws:develop Aug 7, 2023
24 checks passed
@enrico-usai enrico-usai deleted the wip/develop branch August 7, 2023 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog-update Disables the check that enforces changelog updates in PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants