0.1.6
This commit is contained in:
parent
3fc5aec5fc
commit
921801caa6
15 changed files with 1102 additions and 423 deletions
18
tests/test___main__.py
Normal file
18
tests/test___main__.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import runpy
|
||||
|
||||
|
||||
def test_module_main_invokes_cli_main(monkeypatch):
|
||||
import enroll.cli
|
||||
|
||||
called = {"ok": False}
|
||||
|
||||
def fake_main() -> None:
|
||||
called["ok"] = True
|
||||
|
||||
monkeypatch.setattr(enroll.cli, "main", fake_main)
|
||||
|
||||
# Execute enroll.__main__ as if `python -m enroll`.
|
||||
runpy.run_module("enroll.__main__", run_name="__main__")
|
||||
assert called["ok"] is True
|
||||
Loading…
Add table
Add a link
Reference in a new issue