Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most tests fail #17

Open
tbrodbeck opened this issue Mar 9, 2022 · 0 comments
Open

Most tests fail #17

tbrodbeck opened this issue Mar 9, 2022 · 0 comments

Comments

@tbrodbeck
Copy link

For example:

t@v2:~/pynextion $ pytest -s examples/text.py
====================================================================================================================== test session starts =======================================================================================================================
platform linux -- Python 3.9.2, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/t/pynextion
plugins: anyio-3.5.0
collected 1 item

examples/text.py Init
cmd --> bkcmd=3
cmd --> bytearray(b'bkcmd=3\xff\xff\xff')
msg <-- b''
msg <-- <pynextion.events.EmptyMessage object at 0xb59e4fa0>
cmd --> page 0
cmd --> bytearray(b'page 0\xff\xff\xff')
msg <-- b''
msg <-- <pynextion.events.EmptyMessage object at 0xb59e4f88>
Create objects
Reset
cmd --> rest
cmd --> bytearray(b'rest\xff\xff\xff')
F

============================================================================================================================ FAILURES ============================================================================================================================
_____________________________________________________________________________________________________________________ test_text[/dev/ttyS0] ______________________________________________________________________________________________________________________

port = '/dev/ttyS0'

    @pytest.mark.parametrize("port", [PORT_DEFAULT])
    def test_text(port):
        nexSerial = PySerialNex(port)

        print("Init")
        nexSerial.init()

        print("Create objects")
        nexPage = NexPage(nexSerial, "pg_text", pid=2)

        # nexText = NexText(nexSerial, "t1", pid=2, cid=1)
        # nexText = NexText(nexSerial, "t1")
        nexText = NexText(nexSerial, "t1", cid=1)

        print("Reset")
>       nexSerial.reset()

examples/text.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pynextion.hardware.PySerialNex object at 0xb59e4c28>

    def reset(self):
        cmd = "rest"
        # ret = self.send(cmd)
        self.write(cmd)
        time.sleep(1)
        msg = self.read_all()
>       assert msg == b'\x00\x00\x00\xff\xff\xff\x88\xff\xff\xff', "rest returned %s" % msg
E       AssertionError: rest returned b''

pynextion/hardware.py:63: AssertionError
==================================================================================================================== short test summary info =====================================================================================================================
FAILED examples/text.py::test_text[/dev/ttyS0] - AssertionError: rest returned b''
======================================================================================================================= 1 failed in 1.59s ========================================================================================================================

System:

OS: Raspbian GNU/Linux 11 (bullseye) armv7l
Host: Raspberry Pi 4 Model B Rev 1.2
Kernel: 5.10.92-v7l+
Uptime: 5 hours, 48 mins
Packages: 593 (dpkg)
Shell: bash 5.1.4
Terminal: /dev/pts/2
CPU: BCM2711 (4) @ 1.500GHz
Memory: 221MiB / 3838MiB

@tbrodbeck tbrodbeck changed the title Most Tests fail Most tests fail Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant