| 297 | # =========================================================================== |
| 298 | |
| 299 | class TestPathTraversal: |
| 300 | def test_path_join_dotdot_in_tests_not_flagged(self): |
| 301 | """os.path.join with '..' in test data paths should not be flagged.""" |
| 302 | code = """ |
| 303 | data_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'data')) |
| 304 | """ |
| 305 | assert findings_for_rule(code, "PATH813", in_tests_dir=True) == [], \ |
| 306 | "PATH813 should not fire in test files" |
| 307 | |
| 308 | |
| 309 | # =========================================================================== |
nothing calls this directly
no outgoing calls
no test coverage detected