pywizlight
pywizlight copied to clipboard
Question: How to run tests?
Hey all,
pip install pytest pytest-asyncio
$ pip freeze | grep pytest
pytest==6.2.3
pytest-asyncio==0.15.1
$ pytest pywizlight/tests
platform darwin -- Python 3.9.2, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /Users/patrickk/github/pywizlight
plugins: asyncio-0.15.1
collected 18 items
pywizlight/tests/test_bulb.py F.................
All seem to pass except for test_Bulb_Discovery
FAILED pywizlight/tests/test_bulb.py::TestBulb::test_Bulb_Discovery - OSError: [Errno 48] Address already in use
I don't see any documentation on setting up the tests nor are there any github actions configured to run the tests. Any idea what I'm doing wrong?
Do you test the lib on a HASS? It seems to be that the UDP port is already in use on your system. The discovery test is a "real" test against a "fake" bulb. But this will be done via UDP (localhost). All other test are unit-test. The discovery is more an integration test.
All seem to pass except for test_Bulb_Discovery
This test has been adjusted to use a random port so it should pass now
This should be closable since pytest will work out of box now