-
Notifications
You must be signed in to change notification settings - Fork 151
Use pytest.fixture
s for starting servers, use importlib*metadata
#396
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
35ccff9
to
f452c4d
Compare
for more information, see https://pre-commit.ci
pytest.fixture
s for starting servers
pytest.fixture
s for starting serverspytest.fixture
s for starting servers, use importlib*metadata
This will close #378. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you @bollwyvl!!!
Is this to be listed under the changelog as a bugfix and/or maintenance? Typically I've avoided having it listed twice, but I figure it should be seen under bugfix since its fixes a reported bug etc, but the title is all about maintenance. Let's make it list under both this time. |
Thank you both! |
Cheers.
Love entry_points, one of the most powerful things built into the python
packaging system, but even this transition has been far from smooth, as the
backport and stdlib APIs still don't work the same way... Until 3.10, I
guess.
a little aside: we actually found an (already-fixed) bug in the
stdlib/backport behavior when looking into entry_points for replacing
data_files in jupyter_core, hence the version detection. Older stdlib loads
(and does not cache) _all_ eps, which goes straight to performance hell
once you have hundreds of them. It may even be worth considering loading
them lazily, if possible.
|
References
Code Changes
conftest.py
@fixtures
to support starting a serverPORT
andTOKEN
pytest.ini
pyproject.toml
importlib(.|_)metadata
instead ofpkg_resources
(undeclaredsetuptools
dep)CONTRIBUTING.md
Future Work
$HOME
(tricky on windows)test_proxies.py
into smaller files--tornado_settings base_url=/foo/bar/
to test nested pathsscope
correct with e.g.tmp_path
pytest-xdist
can run tests in parallel for a moderate speedup, but carries some additional costsjupyter_server_config.py
, and tests, still hard-coded, and would collide