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

Improve test reliability by cleaning the state before running test_remove_missing_module #36

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

sturmianseq
Copy link
Contributor

This PR aims to improve reliability of the test test_remove_missing_module by cleaning the state before running it.

The test can fail on the second run by running it twice: pip3 install pytest-repeat; python3 -m pytest --count=2 tests/test_operator.py::Test_operator::test_remove_missing_module.

    def test_remove_missing_module(self):
        with pytest.raises(AttributeError):
>           vlx.remove_module(cli_module)
E           Failed: DID NOT RAISE <class 'AttributeError'>

More specifically, this PR cleans the pre-state by ensuring that the cli_module is not in vlx.modules. In this way, the test does not fail on the second run any more.

@DrTexx DrTexx added the bug Something isn't working label Aug 18, 2021
@DrTexx
Copy link
Owner

DrTexx commented Aug 18, 2021

Ah excellent, thank you @sturmianseq !
I'd missed that, I appreciate the PR.

Merged! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants