-
-
Notifications
You must be signed in to change notification settings - Fork 844
Suggest user_plugin in demo to avoid Selenium dependency #5262
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
Conversation
This used to work for me in NiceGUI <3, but now it fails with below's message. I think this might be solved by moving the import of INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/main.py", line 289, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> ~~~~^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/main.py", line 342, in _main
INTERNALERROR> config.hook.pytest_collection(session=session)
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 512, in __call__
INTERNALERROR> return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicall
INTERNALERROR> raise exception
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR> teardown.throw(exception)
INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/logging.py", line 788, in pytest_collection
INTERNALERROR> return (yield)
INTERNALERROR> ^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR> teardown.throw(exception)
INTERNALERROR> ~~~~~~~~~~~~~~^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/warnings.py", line 99, in pytest_collection
INTERNALERROR> return (yield)
INTERNALERROR> ^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 152, in _multicall
INTERNALERROR> teardown.send(result)
INTERNALERROR> ~~~~~~~~~~~~~^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1452, in pytest_collection
INTERNALERROR> self._validate_config_options()
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1474, in _validate_config_options
INTERNALERROR> self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1513, in _warn_or_fail_if_strict
INTERNALERROR> self.issue_config_time_warning(PytestConfigWarning(message), stacklevel=3)
INTERNALERROR> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/Users/user/PycharmProjects/project/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1565, in issue_config_time_warning
INTERNALERROR> warnings.warn(warning, stacklevel=stacklevel)
INTERNALERROR> ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> pytest.PytestConfigWarning: Unknown config option: main_file |
#5269 adds another function |
Thanks @BayerSe. I just added the import and verified behavior in a fresh venv. @falkoschindler you can review this together with #5269. |
Motivation
We encourage devs to avoid the screen tests because they are slower and require Selenium to be installed. But the example in the docs uses the generic plugin which also requires Selenium.
Implementation
Updated demo to use non-selenium user-plugin. In the description above it is clearly explained that there are other plugins to pick. But the demo should be as simple as possible.
Progress