Bug 2220367
| Summary: | F39FailsToInstall: python3-nudatus | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Fedora Fails To Install <fti-bugs> |
| Component: | python-nudatus | Assignee: | Miro Hrončok <mhroncok> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | mhroncok, python-packagers-sig, zbrown |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-nudatus-0.0.5-9.fc39 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-07-25 17:54:49 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2135404, 2168845, 2220045, 2220613 | ||
|
Description
Fedora Fails To Install
2023-07-05 19:16:37 UTC
=================================== FAILURES ===================================
_________________________ test_mangle_with_bad_syntax __________________________
def test_mangle_with_bad_syntax():
"""
Check that mangle throws an
exception for a badly formatted script
"""
script = ""
with open("tests/bigscript_bad.py") as f:
script = f.read()
assert len(script) > 0
> with pytest.raises(tokenize.TokenError):
E Failed: DID NOT RAISE <class 'tokenize.TokenError'>
tests/test_nudatus.py:47: Failed
__________________________ test_main_with_bad_script ___________________________
capfd = <_pytest.capture.CaptureFixture object at 0x7f78c1bc3830>
def test_main_with_bad_script(capfd):
with pytest.raises(SystemExit) as ex:
with mock.patch("sys.argv", ["nudatus", "tests/bigscript_bad.py"]):
nudatus.main()
> assert ex.value.code == 1
tests/test_nudatus.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ExceptionInfo for raises contextmanager>
@property
def value(self) -> E:
"""The exception value."""
> assert (
self._excinfo is not None
), ".value can only be used after the context manager exits"
E AssertionError: .value can only be used after the context manager exits
/usr/lib/python3.12/site-packages/_pytest/_code/code.py:541: AssertionError
----------------------------- Captured stdout call -----------------------------
from microbit import *
)
def show_num(num):
if 1 + 1 == 2 and 2 + 2 == 4 or 3 + 3 == 6 \
and 3 - 3 == 0 and 'this is nonsense' == 'this is nonsense':
print('Hello')
text = """
This should survive
"""
i = Image()
i.fill(0)
if num & 0b00001000:
i.set_pixel(0, 2, 9)
if num & 0b00000100:
i.set_pixel(1, 2, 9)
if num & 0b00000010:
i.set_pixel(2, 2, 9)
if num & 0b00000001:
i.set_pixel(3, 2, 9)
display.show(i)
show_num(12)
=========================== short test summary info ============================
FAILED tests/test_nudatus.py::test_mangle_with_bad_syntax - Failed: DID NOT R...
FAILED tests/test_nudatus.py::test_main_with_bad_script - AssertionError: .va...
========================= 2 failed, 5 passed in 0.14s ==========================
https://github.com/ZanderBrown/nudatus/pull/11 is the easy part -- the tests still fail with: ============================= test session starts ============================== platform linux -- Python 3.12.0b4, pytest-7.4.0, pluggy-1.2.0 cachedir: .tox/py312/.pytest_cache rootdir: .../rpmbuild/fedora-scm/python-nudatus/nudatus collected 7 items tests/test_nudatus.py ..F...F [100%] =================================== FAILURES =================================== _________________________ test_mangle_with_bad_syntax __________________________ def test_mangle_with_bad_syntax(): """ Check that mangle throws an exception for a badly formatted script """ script = "" with open("tests/bigscript_bad.py") as f: script = f.read() assert len(script) > 0 > with pytest.raises(tokenize.TokenError): E Failed: DID NOT RAISE <class 'tokenize.TokenError'> tests/test_nudatus.py:47: Failed __________________________ test_main_with_bad_script ___________________________ capfd = <_pytest.capture.CaptureFixture object at 0x7fc3fcca27e0> def test_main_with_bad_script(capfd): > with pytest.raises(SystemExit) as ex: E Failed: DID NOT RAISE <class 'SystemExit'> tests/test_nudatus.py:95: Failed ----------------------------- Captured stdout call ----------------------------- from microbit import * ) def show_num(num): if 1 + 1 == 2 and 2 + 2 == 4 or 3 + 3 == 6 \ and 3 - 3 == 0 and 'this is nonsense' == 'this is nonsense': print('Hello') text = """ This should survive """ i = Image() i.fill(0) if num & 0b00001000: i.set_pixel(0, 2, 9) if num & 0b00000100: i.set_pixel(1, 2, 9) if num & 0b00000010: i.set_pixel(2, 2, 9) if num & 0b00000001: i.set_pixel(3, 2, 9) display.show(i) show_num(12) =========================== short test summary info ============================ FAILED tests/test_nudatus.py::test_mangle_with_bad_syntax - Failed: DID NOT R... FAILED tests/test_nudatus.py::test_main_with_bad_script - Failed: DID NOT RAI... ========================= 2 failed, 5 passed in 0.04s ========================== |