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

Remove uneeded cd for unit #214

Merged
merged 3 commits into from
Aug 16, 2023
Merged

Conversation

cidrblock
Copy link
Collaborator

In the case of unit tests we were previously changing the directory to the collection directory within the tox venv.

Since the tests are being run by pytest, collection adjaceny is not considered. The pytest command issued runs the tests from the source tree and not the installed collection.

The pytest-ansible plugin is taking care of the injection of ANSIBLE_COLLECTIONS_PATH into ansible.

Remove the cd command for unit, this has the added benefit of cleaning up the test names in the pytest output since the working directory is no longer relative to actual tests.

Tested locally

@cidrblock cidrblock added the bug This issue/PR relates to a bug. label Aug 16, 2023
@cidrblock cidrblock merged commit fad9cb9 into ansible:main Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants