• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PhilippRisius / pytest_nbgrader / 23820198945
80%

Build:
DEFAULT BRANCH: main
Ran 31 Mar 2026 09:28PM UTC
Jobs 3
Files 9
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Mar 2026 09:26PM UTC coverage: 80.385% (-0.8%) from 81.157%
23820198945

push

github

web-flow
Chore/typing and exports (#36)

* feat: add type annotations, __all__ exports, and fix has_import

Part A — Fix has_import and file_contents assertions:
- Add missing `outputs` parameter to match _log wrapper contract
- Replace nonexistent `case.return_object` with `outputs[0][0]`
- Fix relative_to(cwd) crash for stdlib modules via _resolve_origin helper
- Fix inconsistent return tuple lengths (all failures now 3-element)
- Update TestHasImport tests to use standard pipeline (not __wrapped__)
- Add tests for stdlib imports and empty outputs

Part B — Add __all__ exports to all 9 source modules:
- Defines the public API explicitly for each module
- Keeps _log, _SENTINEL, logger as private internals

Part C — Add type annotations to all 9 source modules:
- Add `from __future__ import annotations` to all modules
- Annotate all function signatures, class attributes, and nested helpers
- Define _AssertionResult type alias in assertions.py
- Fix `callable` (builtin) to `Callable` (collections.abc) in prerequisites.py
- Type Timer, TestCase.timing, format_result, execute dispatches in cases.py
- Type TemporarySymlink/TemporarySymlinks with types.ModuleType in runner.py
- Type all pytest hooks and fixtures in conftest.py

All 213 tests pass. All pre-commit hooks pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update mypy override comment for source modules

Annotations are in place; strict enforcement deferred due to
pre-existing dynamic patterns (77 errors, mostly bare generics
and nullable attribute access). The ignore_errors stays for now.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Philipp Risius <philipp.e.risius@theo.physik.uni-giessen.de>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

61 of 99 new or added lines in 9 files covered. (61.62%)

3 existing lines in 3 files now uncovered.

459 of 571 relevant lines covered (80.39%)

2.41 hits per line

Uncovered Changes

Lines Coverage ∆ File
14
51.81
-2.62% src/pytest_nbgrader/cases.py
8
62.79
-3.06% src/pytest_nbgrader/conftest.py
6
69.44
-4.08% src/pytest_nbgrader/harness.py
4
93.75
0.85% src/pytest_nbgrader/assertions.py
4
37.5
-1.97% src/pytest_nbgrader/loader.py
2
0.0
0.0% src/pytest_nbgrader/__init__.py

Coverage Regressions

Lines Coverage ∆ File
1
51.81
-2.62% src/pytest_nbgrader/cases.py
1
69.44
-4.08% src/pytest_nbgrader/harness.py
1
0.0
0.0% src/pytest_nbgrader/__init__.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.12 - 23820198945.1 31 Mar 2026 09:28PM UTC 9
80.39
GitHub Action Run
2 run-3.11 - 23820198945.2 31 Mar 2026 09:28PM UTC 9
80.39
GitHub Action Run
3 run-3.10 - 23820198945.3 31 Mar 2026 09:28PM UTC 9
80.39
GitHub Action Run
Source Files on build 23820198945
  • Tree
  • List 9
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 56fdf202 on github
  • Prev Build on main (#23768057460)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc