fix: stop tracking Python bytecode
This commit is contained in:
parent
d7bdbd3e18
commit
9b912fc837
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18
tests/test_repository_hygiene.py
Normal file
18
tests/test_repository_hygiene.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
def test_python_bytecode_is_not_tracked():
|
||||||
|
tracked = subprocess.run(
|
||||||
|
["git", "ls-files"],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
).stdout.splitlines()
|
||||||
|
|
||||||
|
bytecode = [
|
||||||
|
path
|
||||||
|
for path in tracked
|
||||||
|
if "__pycache__" in path.split("/") or path.endswith((".pyc", ".pyo"))
|
||||||
|
]
|
||||||
|
|
||||||
|
assert bytecode == []
|
||||||
Loading…
Reference in New Issue
Block a user