Merge pull request 'feat: Stop tracked Python bytecode from dirtying autonomous worktree' (#45) from timmy/44-stop-tracked-python-bytecode-from-dirtying-auton into main
This commit was merged in pull request #45.
This commit is contained in:
commit
94cdd0f407
9 files changed
+18
No files matched your search
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.
@@ -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 == []
|
||||
Reference in new issue
Block a user