Skip to content

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