- Update to 1.10.2 * fix: make command line aliases work again #564 * decode bytes from secure cookie #562 * Maintenance and upkeep improvements * Add the needed space in the welcome message #561 * Update check-release workflow #558 * Fix typo in allow_password_change help #559 - Release notes for v1.10.1 * Protect against unset spec #556 - Release notes for v1.10.0 * PR: Add a new preferred-dir traitlet #549 * stop hook for extensions #526 * extensions: allow extensions in namespace packages #523 * Fix examples/simple test execution #552 * Rebuild package-lock, fixing local setup #548 * small test changes #541 - Add conftest.py missing from release tarball OBS-URL: https://build.opensuse.org/request/show/912455 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-server?expand=0&rev=36
34 lines
905 B
Python
34 lines
905 B
Python
import pytest
|
|
|
|
|
|
pytest_plugins = [
|
|
"jupyter_server.pytest_plugin"
|
|
]
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption(
|
|
"--integration_tests",
|
|
default=False,
|
|
type=bool,
|
|
help="only run tests with the 'integration_test' pytest mark.",
|
|
)
|
|
|
|
|
|
def pytest_configure(config):
|
|
# register an additional marker
|
|
config.addinivalue_line(
|
|
"markers", "integration_test"
|
|
)
|
|
|
|
|
|
def pytest_runtest_setup(item):
|
|
is_integration_test = any(mark for mark in item.iter_markers(name="integration_test"))
|
|
|
|
if item.config.getoption("--integration_tests") is True:
|
|
if not is_integration_test:
|
|
pytest.skip("Only running tests marked as 'integration_test'.")
|
|
else:
|
|
if is_integration_test:
|
|
pytest.skip("Skipping this test because it's marked 'integration_test'. Run integration tests using the `--integration_tests` flag.")
|