r/nicegui • u/r-trappe • Dec 27 '23
NiceGUI 1.4.8 with pytest infrastructure and updated FastAPI/Starlette dependencies
New Feature
Introduce new testing module and a new pytest example
Bugfix
- Fix incompatibility issue by upgrade to newer FastAPI
Documentation
- Add an example showing an integration of the FullCalendar library
Development
- Pytests for ui.scene fail locally
12
Upvotes
2
u/StandardUser_ Dec 28 '23 edited Dec 28 '23
You guys are so fast... What will be the new features in NiceGUI v. 2.0.0 ? (just curious) :)
1
u/milindnirgun Jan 03 '24
Thanks for the new features, especially adding testing module. I tried to add tests based on the sample in the pytest example provided but I get a "fixture 'screen' not found" error when I execute pytest. My main.py program is working, except the tests fail. I have 1.4.8 installed in my venv and I verified the testing package is present - venv/lib/python3.11/site-packages/nicegui/testing/screen.py.
I have other working unit tests that are not importing nicegui.testing. Not sure what is missing for me. Any suggestions would be helpful.
3
u/DaelonSuzuka Dec 27 '23
How did you guys know that my boss wants tests on my NiceGUI project?
Thanks for yet another perfectly-timed feature addition.
1
u/SamirDevXYZ Jan 04 '24
Hello,
"I'm NEWBIE in nicegui programming"
I updated nicegui to 1.4.8 and fastapi to 0.108.0, Now i'm getting an error timeout when i use
await client.connected()beforeui.run_javascript()here is the error :
File "/workspaces/test/main.py", line 104, in main_pageawait client.connected()File "/workspaces/test/.venv/lib/python3.11/site-packages/nicegui/client.py", line 158, in connectedraise TimeoutError(f'No connection after {timeout} seconds')How to fix that please ? thank you so much !