Skip to content
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

Fix examples/simple test execution #552

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

davidbrochart
Copy link
Contributor

pytest examples/simple gives the following error:

==================================================================== test session starts =====================================================================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/david/github/davidbrochart/jupyter_server/examples/simple, configfile: pytest.ini
plugins: tornasync-0.6.0.post2, console-scripts-1.2.0, anyio-3.2.1, cov-2.12.1, mock-3.6.1
collected 2 items                                                                                                                                            

examples/simple/tests/test_handlers.py EE                                                                                                              [100%]

=========================================================================== ERRORS ===========================================================================
___________________________________________________________ ERROR at setup of test_handler_default ___________________________________________________________
file /home/david/github/davidbrochart/jupyter_server/examples/simple/tests/test_handlers.py, line 15
  async def test_handler_default(jp_fetch):
      r = await jp_fetch(
          'simple_ext1/default',
          method='GET'
      )
      assert r.code == 200
      print(r.body.decode())
      assert r.body.decode().index('Hello Simple 1 - I am the default...') > -1
E       fixture 'jp_fetch' not found
>       available fixtures: anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, doctest_namespace, http_client, http_server, http_server_client, http_server_port, io_loop, jp_server_config, mocker, module_mocker, monkeypatch, no_cover, package_mocker, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, script_cwd, script_launch_mode, script_runner, session_mocker, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/david/github/davidbrochart/jupyter_server/examples/simple/tests/test_handlers.py:15
__________________________________________________________ ERROR at setup of test_handler_template ___________________________________________________________
file /home/david/github/davidbrochart/jupyter_server/examples/simple/tests/test_handlers.py, line 25
  async def test_handler_template(jp_fetch):
      r = await jp_fetch(
          'simple_ext1/template1/test',
          method='GET'
      )
      assert r.code == 200
E       fixture 'jp_fetch' not found
>       available fixtures: anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, doctest_namespace, http_client, http_server, http_server_client, http_server_port, io_loop, jp_server_config, mocker, module_mocker, monkeypatch, no_cover, package_mocker, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, script_cwd, script_launch_mode, script_runner, session_mocker, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/home/david/github/davidbrochart/jupyter_server/examples/simple/tests/test_handlers.py:25
================================================================== short test summary info ===================================================================
ERROR examples/simple/tests/test_handlers.py::test_handler_default
ERROR examples/simple/tests/test_handlers.py::test_handler_template
===================================================================== 2 errors in 0.56s ======================================================================

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2021

Codecov Report

Merging #552 (47dedfc) into master (e3b2dad) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
+ Coverage   76.88%   76.92%   +0.04%     
==========================================
  Files         109      109              
  Lines        9945     9945              
  Branches     1078     1078              
==========================================
+ Hits         7646     7650       +4     
+ Misses       1915     1913       -2     
+ Partials      384      382       -2     
Impacted Files Coverage Δ
jupyter_server/serverapp.py 66.10% <0.00%> (+0.18%) ⬆️
jupyter_server/config_manager.py 97.26% <0.00%> (+2.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3b2dad...47dedfc. Read the comment docs.

Copy link
Member

@echarles echarles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thx @davidbrochart

@echarles echarles merged commit c9ee2a4 into jupyter-server:master Jul 19, 2021
@blink1073 blink1073 added the bug label Jul 19, 2021
@blink1073 blink1073 added this to the 1.9 milestone Jul 19, 2021
@davidbrochart davidbrochart deleted the fix_contrib branch July 19, 2021 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants