test(01): reproduce bundled checker creating immutable bytecode caches

This commit is contained in:
UnixNight committed 2026-11-14 16:50:04 -05:00
1 parent 07793af9fc
commit 23ee1c2e47
1 file changed
+18
+18
View File
@@ -76,6 +76,24 @@ class FidelityCheckpoint(unittest.TestCase):
self.assertEqual(receipts.identify_tree(self.original)['files'],
receipts.read_json(self.manifest)['files'])
def test_bundled_python_commands_preserve_immutable_tree(self):
self.prepare()
before = receipts.identify_tree(self.output)
for name in ('fidelity_acceptance', 'fidelity_checkpoint', 'fidelity_capture',
'fidelity_review', 'fidelity_ledger'):
result = subprocess.run(
[sys.executable, '-E', 'tools/recon/' + name + '.py', '--help'],
cwd=self.output, capture_output=True, text=True, timeout=20)
self.assertEqual(result.returncode, 0, result.stderr)
self.assertFalse(list((self.output / 'tools/recon').rglob('*.pyc')), name)
for _ in range(2):
result = subprocess.run(
[sys.executable, '-E', 'tools/recon/fidelity_checkpoint.py',
'preflight', '--checkpoint', '.'], cwd=self.output,
capture_output=True, text=True, timeout=20)
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual(receipts.identify_tree(self.output), before)
def test_actual_package_and_resource_bytes_identified(self):
self.prepare()
manifest = receipts.read_json(self.output / 'manifest.json')