MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / TestPathTraversal

Class TestPathTraversal

tests/unit/test_false_positive_reductions.py:299–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297# ===========================================================================
298
299class 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# ===========================================================================

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected