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

Removing the redundant file introduced #9

Merged
merged 2 commits into from Oct 11, 2021

Conversation

sturmianseq
Copy link
Contributor

This PR aims to improve test reliability of test test_touch_on_new_file by Removing the redundant file introduced by calling method os.remove

The test can fail in this way by running pip3 install pytest-repeat; python3 -m pytest --count=2 fs/tests/test_touch.py::test_touch_on_new_file:

    def test_touch_on_new_file():
    
        new_file = os.path.join(TEST_DIR, "new_file.txt")
    
        if (os.path.exists(new_file)):
>           raise ValueError("File new_file.txt already exists!")
E           ValueError: File new_file.txt already exists!

It may be better to clean state pollutions so that some other tests won't fail in the future due to the shared state pollution.

@chaosmail
Copy link
Owner

Thanks @sturmianseq, looks good!

@chaosmail chaosmail merged commit 0c1fad1 into chaosmail:master Oct 11, 2021
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.

None yet

2 participants