Files
2026-10-14 10:01:46 +00:00

225 lines
16 KiB
Plaintext

$ python3 -m unittest discover -s tests/python -p test_ambience_audio.py -k AtomicPublication -v
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) ... {
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='street') ... FAIL
{
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='mall') ... FAIL
{
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='theater') ... FAIL
{
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='department') ... FAIL
{
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='market') ... FAIL
{
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='subway') ... FAIL
{
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='cafe') ... FAIL
{
"files": 8,
"bytes": 4608352
}
test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='rain') ... FAIL
test_atomic_success_removes_stale_files_and_stages_notice_on_same_filesystem (test_ambience_audio.AtomicPublication.test_atomic_success_removes_stale_files_and_stages_notice_on_same_filesystem) ... {
"files": 8,
"bytes": 4608352
}
FAIL
test_conversion_failure_and_keyboard_interrupt_preserve_prior_directory (test_ambience_audio.AtomicPublication.test_conversion_failure_and_keyboard_interrupt_preserve_prior_directory) ... ok
test_exchange_failure_preserves_prior_directory (test_ambience_audio.AtomicPublication.test_exchange_failure_preserves_prior_directory) ... ERROR
test_first_publication_and_real_exchange (test_ambience_audio.AtomicPublication.test_first_publication_and_real_exchange) ... {
"files": 8,
"bytes": 4608352
}
FAIL
test_manifest_and_notice_write_failures_preserve_prior_directory (test_ambience_audio.AtomicPublication.test_manifest_and_notice_write_failures_preserve_prior_directory) ...
test_manifest_and_notice_write_failures_preserve_prior_directory (test_ambience_audio.AtomicPublication.test_manifest_and_notice_write_failures_preserve_prior_directory) (file='AMBIENCE_NOTICES.md') ... FAIL
test_sigterm_before_commit_preserves_prior_directory (test_ambience_audio.AtomicPublication.test_sigterm_before_commit_preserves_prior_directory) ... Process ForkProcess-1:
Traceback (most recent call last):
File "/home/hermes/.local/share/uv/python/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/home/hermes/.local/share/uv/python/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 229, in child
with patch.object(audio, "atomic_publish", pause): self.run_generate()
File "/home/hermes/.local/share/uv/python/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py", line 1446, in __enter__
original, local = self.get_original()
^^^^^^^^^^^^^^^^^^^
File "/home/hermes/.local/share/uv/python/cpython-3.11.16-linux-x86_64-gnu/lib/python3.11/unittest/mock.py", line 1419, in get_original
raise AttributeError(
AttributeError: <module 'ambience_audio' from '/home/hermes/worktrees/find-word-v0.2.3/scripts/ambience_audio.py'> does not have the attribute 'atomic_publish'
FAIL
test_staged_manifest_notice_and_inventory_tampering_are_rejected (test_ambience_audio.AtomicPublication.test_staged_manifest_notice_and_inventory_tampering_are_rejected) ... ERROR
test_symlink_output_is_rejected_before_conversion (test_ambience_audio.AtomicPublication.test_symlink_output_is_rejected_before_conversion) ...
test_symlink_output_is_rejected_before_conversion (test_ambience_audio.AtomicPublication.test_symlink_output_is_rejected_before_conversion) (dangling=False) ... ERROR
test_symlink_output_is_rejected_before_conversion (test_ambience_audio.AtomicPublication.test_symlink_output_is_rejected_before_conversion) (dangling=True) ... ERROR
======================================================================
ERROR: test_exchange_failure_preserves_prior_directory (test_ambience_audio.AtomicPublication.test_exchange_failure_preserves_prior_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 204, in test_exchange_failure_preserves_prior_directory
with patch.object(audio.ctypes, "CDLL") as mocked:
^^^^^^^^^^^^
AttributeError: module 'ambience_audio' has no attribute 'ctypes'
======================================================================
ERROR: test_staged_manifest_notice_and_inventory_tampering_are_rejected (test_ambience_audio.AtomicPublication.test_staged_manifest_notice_and_inventory_tampering_are_rejected)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 181, in test_staged_manifest_notice_and_inventory_tampering_are_rejected
validate = audio.validate_bundle
^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'ambience_audio' has no attribute 'validate_bundle'
======================================================================
ERROR: test_symlink_output_is_rejected_before_conversion (test_ambience_audio.AtomicPublication.test_symlink_output_is_rejected_before_conversion) (dangling=False)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 174, in test_symlink_output_is_rejected_before_conversion
audio.generate(self.plan, self.sources, link, converter=converter)
File "/home/hermes/worktrees/find-word-v0.2.3/scripts/ambience_audio.py", line 114, in generate
entry.update({"file": name, "sourceSha256": digest(source), "sourceBytes": source.stat().st_size,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Mock.keys() returned a non-iterable (type Mock)
======================================================================
ERROR: test_symlink_output_is_rejected_before_conversion (test_ambience_audio.AtomicPublication.test_symlink_output_is_rejected_before_conversion) (dangling=True)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 174, in test_symlink_output_is_rejected_before_conversion
audio.generate(self.plan, self.sources, link, converter=converter)
File "/home/hermes/worktrees/find-word-v0.2.3/scripts/ambience_audio.py", line 114, in generate
entry.update({"file": name, "sourceSha256": digest(source), "sourceBytes": source.stat().st_size,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Mock.keys() returned a non-iterable (type Mock)
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='street')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='mall')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='theater')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='department')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='market')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='subway')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='cafe')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_all_eight_assets_validated_before_publication (test_ambience_audio.AtomicPublication.test_all_eight_assets_validated_before_publication) (asset='rain')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 139, in test_all_eight_assets_validated_before_publication
with self.assertRaises(ValueError): self.run_generate(broken)
AssertionError: ValueError not raised
======================================================================
FAIL: test_atomic_success_removes_stale_files_and_stages_notice_on_same_filesystem (test_ambience_audio.AtomicPublication.test_atomic_success_removes_stale_files_and_stages_notice_on_same_filesystem)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 118, in test_atomic_success_removes_stale_files_and_stages_notice_on_same_filesystem
self.assertEqual({p.name for p in self.output.iterdir()}, expected)
AssertionError: Items in the first set but not the second:
'old'
Items in the second set but not the first:
'AMBIENCE_NOTICES.md'
======================================================================
FAIL: test_first_publication_and_real_exchange (test_ambience_audio.AtomicPublication.test_first_publication_and_real_exchange)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 214, in test_first_publication_and_real_exchange
self.assertTrue((self.output / "AMBIENCE_NOTICES.md").is_file())
AssertionError: False is not true
======================================================================
FAIL: test_manifest_and_notice_write_failures_preserve_prior_directory (test_ambience_audio.AtomicPublication.test_manifest_and_notice_write_failures_preserve_prior_directory) (file='AMBIENCE_NOTICES.md')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 164, in test_manifest_and_notice_write_failures_preserve_prior_directory
self.assert_prior()
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 112, in assert_prior
self.assertEqual({p.name: p.read_bytes() for p in self.output.iterdir()}, {"old": b"prior release"})
AssertionError: {'subway.wav': b'RIFF$\xca\x08\x00WAVEfmt \[15606259 chars]x00'} != {'old': b'prior release'}
Diff is 21440297 characters long. Set self.maxDiff to None to see it.
======================================================================
FAIL: test_sigterm_before_commit_preserves_prior_directory (test_ambience_audio.AtomicPublication.test_sigterm_before_commit_preserves_prior_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hermes/worktrees/find-word-v0.2.3/tests/python/test_ambience_audio.py", line 233, in test_sigterm_before_commit_preserves_prior_directory
self.assertTrue(reached.wait(10), "validated stage must reach commit")
AssertionError: False is not true : validated stage must reach commit
----------------------------------------------------------------------
Ran 9 tests in 12.490s
FAILED (failures=12, errors=4)
EXIT_CODE=1