Skip to content

Conversation

@mahendrapaipuri
Copy link
Contributor

This PR adds basic tests for the package. Currently, we implemented the tests for module package and we are also testing handlers.

All fixtures are defined in conftest.py and we are reusing them in tests for module and handlers.

@cmd-ntrf Can I add a workflow to test these tests in CI? I did not add it now as I am not sure if you are using shared runners (with quota) or your on-premise runners.

@cmd-ntrf cmd-ntrf self-requested a review April 12, 2023 14:01
@cmd-ntrf cmd-ntrf self-assigned this Apr 12, 2023
@cmd-ntrf
Copy link
Owner

@cmd-ntrf Can I add a workflow to test these tests in CI? I did not add it now as I am not sure if you are using shared runners (with quota) or your on-premise runners.

Please do. I am using shared-runners.

@mahendrapaipuri
Copy link
Contributor Author

Added a preliminary test workflow. I adopted the one from jupyter-server-proxy project.

@cmd-ntrf
Copy link
Owner

@mahendrapaipuri better late than never they say. Could you rebase this on main?

@mahendrapaipuri
Copy link
Contributor Author

@cmd-ntrf I am so sorry, I missed your comment. I will try to do it over this weekend!

mahendrapaipuri and others added 11 commits May 25, 2025 10:50
Set correct EMPTY_LIST_STR for each module system
Fix print_output_decorator by making it async
Improve module list logic by properly catching hidden modules
Remove header in savelist if present
This is very rudimentary. Most probably there will be failed tests.
This is needed for coverage to generate cov report properly
* ci: Bump actions versions and remove unnecessary test cases

* build: Remove support for Python 3.6-3.8 and add support till 3.13

* fix: Correct module_system function name in module

Signed-off-by: Mahendra Paipuri <[email protected]>
* Seems unnecessary

Signed-off-by: Mahendra Paipuri <[email protected]>
Signed-off-by: Mahendra Paipuri <[email protected]>
@mahendrapaipuri
Copy link
Contributor Author

@cmd-ntrf There you go, rebased and fixed minor issues mostly in CI. Let me know if your feedback!!

@cmd-ntrf cmd-ntrf requested a review from Copilot May 27, 2025 14:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces basic tests for the package and updates some workflows and module functionality.

  • Adds tests for both the module API and HTTP handlers.
  • Updates configuration files (pytest.ini, pyproject.toml) and GitHub workflows.
  • Makes minor improvements in module functions, such as refining error messages and cache handling.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_module.py Adds tests for module commands and tests for various module APIs.
tests/test_handlers.py Adds tests for HTTP endpoints of the module handlers.
tests/pytest.ini Configures pytest options including coverage and HTML reports.
tests/conftest.py Provides common fixtures for tests across module and handlers.
pyproject.toml Updates project configuration including Python version and build options.
module/init.py Updates module API functions and error messages.
jupyterlmod/handler.py Adds new logoHandler functionality and refactors imports.
jupyterlmod/init.py Updates server extension handler registration.
.github/workflows/test.yml Adds a CI workflow job to run tests and verify extensions.
.github/workflows/main.yml Updates workflows to use newer action versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants