def test_main(monkeypatch): check_result = pretend.stub() check_stub = pretend.call_recorder(lambda a: check_result) monkeypatch.setattr(check, "check", check_stub) assert check.main(["dist/*"]) == check_result assert check_stub.calls == [pretend.call(["dist/*"])]