Package: src:python-nudatus
Version: 0.0.5-2
Severity: important
Tags: sid trixie
User: [email protected]
Usertags: python3.12

python-nudatus autopkg tests fail with Python 3.12:

[...]
256s ============================= test session starts ============================== 256s platform linux -- Python 3.12.0+, pytest-7.4.3, pluggy-1.3.0 -- /usr/bin/python3.12
256s cachedir: .pytest_cache
256s rootdir: /tmp/autopkgtest.jHOr5y/autopkgtest_tmp
256s collecting ... collected 7 items
256s
256s tests/test_nudatus.py::test_get_version PASSED [ 14%] 256s tests/test_nudatus.py::test_mangle_script PASSED [ 28%] 256s tests/test_nudatus.py::test_mangle_with_bad_syntax FAILED [ 42%] 256s tests/test_nudatus.py::test_main_without_file PASSED [ 57%] 256s tests/test_nudatus.py::test_main_with_file_without_output_file PASSED [ 71%] 256s tests/test_nudatus.py::test_main_with_file_with_output_file PASSED [ 85%] 256s tests/test_nudatus.py::test_main_with_bad_script FAILED [100%]
256s
256s =================================== FAILURES =================================== 256s _________________________ test_mangle_with_bad_syntax __________________________
256s
256s     def test_mangle_with_bad_syntax():
256s         """
256s         Check that mangle throws an
256s         exception for a badly formatted script
256s         """
256s         script = ""
256s         with open("tests/bigscript_bad.py") as f:
256s             script = f.read()
256s         assert len(script) > 0
256s >       with pytest.raises(tokenize.TokenError):
256s E       Failed: DID NOT RAISE <class 'tokenize.TokenError'>
256s
256s tests/test_nudatus.py:47: Failed
256s __________________________ test_main_with_bad_script ___________________________
256s
256s capfd = <_pytest.capture.CaptureFixture object at 0x7f2ea6f42ff0>
256s
256s     def test_main_with_bad_script(capfd):
256s         with pytest.raises(SystemExit) as ex:
256s with mock.patch("sys.argv", ["nudatus", "tests/bigscript_bad.py"]):
256s                 nudatus.main()
256s >           assert ex.value.code == 1
256s
256s tests/test_nudatus.py:98:
256s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
256s
256s self = <ExceptionInfo for raises contextmanager>
256s
256s     @property
256s     def value(self) -> E:
256s         """The exception value."""
256s >       assert (
256s             self._excinfo is not None
256s         ), ".value can only be used after the context manager exits"
256s E AssertionError: .value can only be used after the context manager exits
256s
256s /usr/lib/python3/dist-packages/_pytest/_code/code.py:558: AssertionError 256s ----------------------------- Captured stdout call -----------------------------
256s from microbit import *
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s
256s )
256s def show_num(num):
256s     if 1 + 1 == 2 and 2 + 2 == 4 or 3 + 3 == 6 \
256s        and 3 - 3 == 0 and 'this is nonsense' == 'this is nonsense':
256s         print('Hello')
256s         text = """
256s            This should survive
256s            """
256s     i = Image()
256s     i.fill(0)
256s     if num & 0b00001000:
256s         i.set_pixel(0, 2, 9)
256s     if num & 0b00000100:
256s         i.set_pixel(1, 2, 9)
256s     if num & 0b00000010:
256s         i.set_pixel(2, 2, 9)
256s     if num & 0b00000001:
256s         i.set_pixel(3, 2, 9)
256s     display.show(i)
256s
256s show_num(12)
256s =========================== short test summary info ============================ 256s FAILED tests/test_nudatus.py::test_mangle_with_bad_syntax - Failed: DID NOT R... 256s FAILED tests/test_nudatus.py::test_main_with_bad_script - AssertionError: .va... 256s ========================= 2 failed, 5 passed in 0.08s ==========================

Reply via email to