-
Notifications
You must be signed in to change notification settings - Fork 11
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
0.1.0: pytest is failing #10
Comments
Here is pytest output: + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-shim-0.1.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-notebook-shim-0.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra notebook_shim/tests
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0, configfile: pyproject.toml, testpaths: notebook_shim/tests
plugins: datadir-1.3.1, regressions-2.3.1, timeout-2.1.0, anyio-3.6.1, tornasync-0.6.0.post2
collected 10 items
notebook_shim/tests/test_extension.py FFFFFFFFFF [100%]
================================================================================= FAILURES =================================================================================
______________________________________________________ test_EXTAPP_AND_NBAPP_SHIM_MSG[jp_argv0-enable_mathjax-False] _______________________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a21d130>, extapp_log = <_io.StringIO object at 0x7f520a29ab80>
jp_argv = ['--MockExtensionApp.enable_mathjax=False'], trait_name = 'enable_mathjax', trait_value = False
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('enable_mathjax', False)
])
)
def test_EXTAPP_AND_NBAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.EXTAPP_AND_NBAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'enable_mathjax' is found in both MockExtensionApp and NotebookApp. This is a recent change. This config will only be set in MockExtensionApp. Please check if you should also config these traits in NotebookApp for your purpose." in ''
notebook_shim/tests/test_extension.py:89: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:26.704 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:26.733 MockExtensionApp] 'enable_mathjax' is found in both MockExtensionApp and NotebookApp. This is a recent change. This config will only be set in MockExtensionApp. Please check if you should also config these traits in NotebookApp for your purpose.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_NBAPP_SHIM_MSG0/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:45747/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:45747/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
__________________________________________________________ test_EXTAPP_AND_SVAPP_SHIM_MSG[jp_argv0-allow_origin-] __________________________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a0f2df0>, extapp_log = <_io.StringIO object at 0x7f520a118e50>
jp_argv = ['--MockExtensionApp.allow_origin='], trait_name = 'allow_origin', trait_value = ''
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('allow_origin', ''),
('allow_origin_pat', ''),
])
)
def test_EXTAPP_AND_SVAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.EXTAPP_AND_SVAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'allow_origin' is found in both MockExtensionApp and ServerApp. This is a recent change. This config will only be set in MockExtensionApp. Please check if you should also config these traits in ServerApp for your purpose." in ''
notebook_shim/tests/test_extension.py:111: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:26.805 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:26.830 MockExtensionApp] 'allow_origin' is found in both MockExtensionApp and ServerApp. This is a recent change. This config will only be set in MockExtensionApp. Please check if you should also config these traits in ServerApp for your purpose.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG0/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:36687/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:36687/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
________________________________________________________ test_EXTAPP_AND_SVAPP_SHIM_MSG[jp_argv1-allow_origin_pat-] ________________________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a0f9f10>, extapp_log = <_io.StringIO object at 0x7f520a0da790>
jp_argv = ['--MockExtensionApp.allow_origin_pat='], trait_name = 'allow_origin_pat', trait_value = ''
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('allow_origin', ''),
('allow_origin_pat', ''),
])
)
def test_EXTAPP_AND_SVAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.EXTAPP_AND_SVAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'allow_origin_pat' is found in both MockExtensionApp and ServerApp. This is a recent change. This config will only be set in MockExtensionApp. Please check if you should also config these traits in ServerApp for your purpose." in ''
notebook_shim/tests/test_extension.py:111: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:26.851 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:26.876 MockExtensionApp] 'allow_origin_pat' is found in both MockExtensionApp and ServerApp. This is a recent change. This config will only be set in MockExtensionApp. Please check if you should also config these traits in ServerApp for your purpose.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_AND_SVAPP_SHIM_MSG1/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:42919/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:42919/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
________________________________________ test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv0-jinja_environment_options-trait_value0] _________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a0f2040>, extapp_log = <_io.StringIO object at 0x7f520a0dea60>
jp_argv = ['--MockExtensionApp.jinja_environment_options={}'], trait_name = 'jinja_environment_options', trait_value = {}
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('jinja_environment_options', {}),
('jinja_template_vars', {}),
('extra_template_paths', []),
('quit_button', True),
])
)
def test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'jinja_environment_options' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. Thi...ig will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose." in ''
notebook_shim/tests/test_extension.py:135: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:26.898 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:26.924 MockExtensionApp] 'jinja_environment_options' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP0/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:42475/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:42475/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
___________________________________________ test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv1-jinja_template_vars-trait_value1] ____________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a0af7f0>, extapp_log = <_io.StringIO object at 0x7f520a053f70>
jp_argv = ['--MockExtensionApp.jinja_template_vars={}'], trait_name = 'jinja_template_vars', trait_value = {}
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('jinja_environment_options', {}),
('jinja_template_vars', {}),
('extra_template_paths', []),
('quit_button', True),
])
)
def test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'jinja_template_vars' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. This is l...ig will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose." in ''
notebook_shim/tests/test_extension.py:135: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:26.945 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:26.970 MockExtensionApp] 'jinja_template_vars' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP1/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:36395/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:36395/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
___________________________________________ test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv2-extra_template_paths-trait_value2] ___________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a0af490>, extapp_log = <_io.StringIO object at 0x7f520a061790>
jp_argv = ['--MockExtensionApp.extra_template_paths=[]'], trait_name = 'extra_template_paths', trait_value = []
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('jinja_environment_options', {}),
('jinja_template_vars', {}),
('extra_template_paths', []),
('quit_button', True),
])
)
def test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'extra_template_paths' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. This is ...ig will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose." in ''
notebook_shim/tests/test_extension.py:135: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:26.990 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:27.015 MockExtensionApp] 'extra_template_paths' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP2/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:46465/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:46465/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
___________________________________________________ test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv3-quit_button-True] ____________________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a015d90>, extapp_log = <_io.StringIO object at 0x7f520a0644c0>
jp_argv = ['--MockExtensionApp.quit_button=True'], trait_name = 'quit_button', trait_value = True
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('jinja_environment_options', {}),
('jinja_template_vars', {}),
('extra_template_paths', []),
('quit_button', True),
])
)
def test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'quit_button' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. This is likely a ...ig will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose." in ''
notebook_shim/tests/test_extension.py:135: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:27.036 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:27.060 MockExtensionApp] 'quit_button' is not found in MockExtensionApp, but it was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in ServerApp. Please check if you should also config these traits in NotebookApp for your purpose.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_NOT_EXTAPP_NBAPP_AND_SVAP3/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:34759/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:34759/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
_____________________________________________________ test_EXTAPP_TO_SVAPP_SHIM_MSG[jp_argv0-allow_credentials-False] ______________________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a079490>, extapp_log = <_io.StringIO object at 0x7f520a064f70>
jp_argv = ['--MockExtensionApp.allow_credentials=False'], trait_name = 'allow_credentials', trait_value = False
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('allow_credentials', False),
])
)
def test_EXTAPP_TO_SVAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.EXTAPP_TO_SVAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'allow_credentials' has moved from MockExtensionApp to ServerApp. Be sure to update your config before our next release." in ''
notebook_shim/tests/test_extension.py:156: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:27.082 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:27.107 MockExtensionApp] 'allow_credentials' has moved from MockExtensionApp to ServerApp. Be sure to update your config before our next release.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_SVAPP_SHIM_MSG_0/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:46233/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:46233/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
_______________________________________________________ test_EXTAPP_TO_NBAPP_SHIM_MSG[jp_argv0-mathjax_config-TEST] ________________________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a0772b0>, extapp_log = <_io.StringIO object at 0x7f520a064ee0>
jp_argv = ['--MockExtensionApp.mathjax_config=TEST'], trait_name = 'mathjax_config', trait_value = 'TEST'
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('mathjax_config', 'TEST'),
('mathjax_url', 'TEST')
])
)
def test_EXTAPP_TO_NBAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.EXTAPP_TO_NBAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'mathjax_config' has moved from MockExtensionApp to NotebookApp. Be sure to update your config before our next release." in ''
notebook_shim/tests/test_extension.py:178: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:27.127 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:27.151 MockExtensionApp] 'mathjax_config' has moved from MockExtensionApp to NotebookApp. Be sure to update your config before our next release.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_0/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:46151/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:46151/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
_________________________________________________________ test_EXTAPP_TO_NBAPP_SHIM_MSG[jp_argv1-mathjax_url-TEST] _________________________________________________________
extensionapp = <notebook_shim.tests.mockextension.MockExtensionApp object at 0x7f520a0ed340>, extapp_log = <_io.StringIO object at 0x7f520a064af0>
jp_argv = ['--MockExtensionApp.mathjax_url=TEST'], trait_name = 'mathjax_url', trait_value = 'TEST'
@pytest.mark.parametrize(
'jp_argv,trait_name,trait_value',
list_test_params([
('mathjax_config', 'TEST'),
('mathjax_url', 'TEST')
])
)
def test_EXTAPP_TO_NBAPP_SHIM_MSG(
extensionapp,
extapp_log,
jp_argv,
trait_name,
trait_value
):
log = extapp_log.getvalue()
# Verify a shim warning appeared.
log_msg = shim.EXTAPP_TO_NBAPP_SHIM_MSG(trait_name, 'MockExtensionApp')
> assert log_msg in log
E assert "'mathjax_url' has moved from MockExtensionApp to NotebookApp. Be sure to update your config before our next release." in ''
notebook_shim/tests/test_extension.py:178: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
[D 2022-08-08 19:56:27.172 ServerApp] Config changed: {'ServerApp': {'jpserver_extensions': {'notebook_shim': True, 'notebook_shim.tests.mockextension': True}}, 'NotebookNotary': {'db_file': ':memory:'}}
[W 2022-08-08 19:56:27.196 MockExtensionApp] 'mathjax_url' has moved from MockExtensionApp to NotebookApp. Be sure to update your config before our next release.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
DEBUG ServerApp:application.py:183 Searching ['/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/config', '/home/tkloczko/.local/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/env/etc/jupyter', '/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/etc/jupyter'] for config files
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/config
DEBUG ServerApp:application.py:837 Looking for jupyter_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/env/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/.local/etc/jupyter
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/config
DEBUG ServerApp:application.py:837 Looking for jupyter_server_config in /home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/env/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/.local/etc/jupyter/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/config/jupyter_server_config.json
DEBUG ServerApp:config_manager.py:93 Paths used for configuration of jupyter_server_config:
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.d/notebook_shim.json
/home/tkloczko/rpmbuild/BUILD/notebook_shim-0.1.0/jupyter_server_config.json
INFO ServerApp:serverapp.py:2726 Serving notebooks from local directory: /tmp/pytest-of-tkloczko/pytest-56/test_EXTAPP_TO_NBAPP_SHIM_MSG_1/root_dir
INFO ServerApp:serverapp.py:2726 Jupyter Server 1.18.1 is running at:
INFO ServerApp:serverapp.py:2726 http://localhost:40845/a%40b/?token=...
INFO ServerApp:serverapp.py:2726 or http://127.0.0.1:40845/a%40b/?token=...
INFO ServerApp:serverapp.py:2727 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
-------------------------------------------------------------------------- Captured log teardown ---------------------------------------------------------------------------
INFO ServerApp:serverapp.py:2514 Shutting down 2 extensions
DEBUG ServerApp:manager.py:367 notebook_shim.tests.mockextension | extension app "mockextension" stopping
DEBUG ServerApp:manager.py:369 notebook_shim.tests.mockextension | extension app "mockextension" stopped
INFO ServerApp:serverapp.py:2503 Shutting down 0 terminals
============================================================================= warnings summary =============================================================================
notebook_shim/tests/test_extension.py: 10 warnings
/usr/lib64/python3.8/site-packages/tornado/ioloop.py:350: DeprecationWarning: make_current is deprecated; start the event loop first
self.make_current()
notebook_shim/tests/test_extension.py: 10 warnings
/usr/lib/python3.8/site-packages/pytest_tornasync/plugin.py:65: DeprecationWarning: make_current is deprecated; start the event loop first
loop.make_current()
notebook_shim/tests/test_extension.py: 10 warnings
/usr/lib/python3.8/site-packages/pytest_tornasync/plugin.py:67: DeprecationWarning: clear_current is deprecated
loop.clear_current()
notebook_shim/tests/test_extension.py::test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv0-jinja_environment_options-trait_value0]
/usr/lib/python3.8/site-packages/traitlets/traitlets.py:3258: FutureWarning: --jinja_environment_options={} for dict-traits is deprecated in traitlets 5.0. You can pass --jinja_environment_options <key=value> ... multiple times to add items to a dict.
warn(
notebook_shim/tests/test_extension.py::test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv1-jinja_template_vars-trait_value1]
/usr/lib/python3.8/site-packages/traitlets/traitlets.py:3258: FutureWarning: --jinja_template_vars={} for dict-traits is deprecated in traitlets 5.0. You can pass --jinja_template_vars <key=value> ... multiple times to add items to a dict.
warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
FAILED notebook_shim/tests/test_extension.py::test_EXTAPP_AND_NBAPP_SHIM_MSG[jp_argv0-enable_mathjax-False] - assert "'enable_mathjax' is found in both MockExtensionApp ...
FAILED notebook_shim/tests/test_extension.py::test_EXTAPP_AND_SVAPP_SHIM_MSG[jp_argv0-allow_origin-] - assert "'allow_origin' is found in both MockExtensionApp and Serve...
FAILED notebook_shim/tests/test_extension.py::test_EXTAPP_AND_SVAPP_SHIM_MSG[jp_argv1-allow_origin_pat-] - assert "'allow_origin_pat' is found in both MockExtensionApp a...
FAILED notebook_shim/tests/test_extension.py::test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv0-jinja_environment_options-trait_value0] - assert "'jinja_environment_opti...
FAILED notebook_shim/tests/test_extension.py::test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv1-jinja_template_vars-trait_value1] - assert "'jinja_template_vars' is not ...
FAILED notebook_shim/tests/test_extension.py::test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv2-extra_template_paths-trait_value2] - assert "'extra_template_paths' is no...
FAILED notebook_shim/tests/test_extension.py::test_NOT_EXTAPP_NBAPP_AND_SVAPP_SHIM_MSG[jp_argv3-quit_button-True] - assert "'quit_button' is not found in MockExtensionAp...
FAILED notebook_shim/tests/test_extension.py::test_EXTAPP_TO_SVAPP_SHIM_MSG[jp_argv0-allow_credentials-False] - assert "'allow_credentials' has moved from MockExtensionA...
FAILED notebook_shim/tests/test_extension.py::test_EXTAPP_TO_NBAPP_SHIM_MSG[jp_argv0-mathjax_config-TEST] - assert "'mathjax_config' has moved from MockExtensionApp to N...
FAILED notebook_shim/tests/test_extension.py::test_EXTAPP_TO_NBAPP_SHIM_MSG[jp_argv1-mathjax_url-TEST] - assert "'mathjax_url' has moved from MockExtensionApp to Noteboo...
===================================================================== 10 failed, 32 warnings in 0.63s ====================================================================== |
13 tasks
This was caused by a chance in traitlets (>5.2). I've fixed this in #12 while bumping the version of jupyter server. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like now after few upgrades in build env insteda warnings reported in #7 I have failling pytest .
Here is list of modules installed in build env:
The text was updated successfully, but these errors were encountered: