Should detect pytest from test file.
(self)
| 23 | """Test preference detection from code.""" |
| 24 | |
| 25 | def test_detect_pytest(self): |
| 26 | """Should detect pytest from test file.""" |
| 27 | content = """ |
| 28 | import pytest |
| 29 | |
| 30 | def test_login(): |
| 31 | assert True |
| 32 | |
| 33 | @pytest.fixture |
| 34 | def client(): |
| 35 | pass |
| 36 | """ |
| 37 | result = PreferenceDetector.detect_test_framework(content) |
| 38 | assert result == "pytest" |
| 39 | |
| 40 | def test_detect_unittest(self): |
| 41 | """Should detect unittest from test file.""" |
nothing calls this directly
no test coverage detected