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

testmon fail to capture simple case setup_class #240

Open
thaiminhpv opened this issue Sep 24, 2024 · 0 comments
Open

testmon fail to capture simple case setup_class #240

thaiminhpv opened this issue Sep 24, 2024 · 0 comments

Comments

@thaiminhpv
Copy link

thaiminhpv commented Sep 24, 2024

Summary

After modifying setup_class function, pytest-testmon only run again TestClass::test_A, but not run again TestClass::test_B, and therefore still pass all (but expected to fail)

# test_class.py
class TestClass:
    def setup_class(self):
        self.array = ["A", "B"]
        # self.array = ["A"]  # after modification
        
    def test_A(self):
        assert "A" in self.array
    
    def test_B(self):
        assert "B" in self.array
> pip list | grep test
pytest                                   8.3.2
pytest-cov                               5.0.0
pytest-remotedata                        0.4.1
pytest-testmon                           2.1.1
pytest-xdist                             3.6.1

Note: This pytest setup schema is similar to a real-world project, and testmon failed this case
https://github.com/astropy/astropy/blob/5c7c9dda7fcf99eb38952f7944645b8879a39531/astropy/io/votable/tests/test_vo.py#L395

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

No branches or pull requests

1 participant