gator icon indicating copy to clipboard operation
gator copied to clipboard

Migrate tests from `notebook.tests` to `jupyter_server` and pytest-style framework

Open RRosio opened this issue 4 months ago • 1 comments
trafficstars

  • [ ] Determine equivalent test structure using jupyter_server’s pytest plugin
  • [ ] Replace custom setup/teardown with pytest fixtures:jp_serverapp, jp_fetch etc
    • Currently we import from notebook.tests.*, notebook.notebookapp.* and notebook.utils
      • ServerTestBase, assert_http_error etc
  • [ ] Update CI to no longer install notebook<7
  • [ ] Remove any compatibility fallbacks once migration is complete

RRosio avatar Jun 27 '25 17:06 RRosio

#262 depends on removing support for Notebook v6 since it requires Python < 3.10.

danyeaw avatar Jun 28 '25 01:06 danyeaw

Maybe we can also do a incremental approach to moving tests over to the pytest-jupyter plugin. We can keep the current test suite running and add in another test directory where we begin porting the tests. I was thinking we can start off with a different CI job for these tests, and the base configuration then begin including the necessary fixtures, and tests as we go. cc @danyeaw

RRosio avatar Jul 02 '25 18:07 RRosio

I like this incremental approach. Since we are already using pytest, could we keep it all part of the same test suite, just migrate a few tests at a time?

danyeaw avatar Jul 02 '25 18:07 danyeaw