Skip to content

Commit f9c5527

Browse files
committed
Add __all__ to coverage.py and make process_results_json internal
1 parent 6331cfa commit f9c5527

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

jmu_pytest_utils/coverage.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
"""Run test coverage and analyze the results."""
22

3+
__all__ = [
4+
"assert_fail",
5+
"assert_pass",
6+
"assert_cover",
7+
]
8+
39
import importlib
410
import json
511
import os
@@ -31,7 +37,7 @@ def inject_random(main_filename):
3137
obj.__code__ = _return_random.__code__
3238

3339

34-
def process_results_json(function, status, penalty):
40+
def _process_results_json(function, status, penalty):
3541
"""Verify correctness in the results.json file.
3642
3743
Args:
@@ -85,7 +91,7 @@ def assert_fail(function, main_filename, test_filename, penalty=1):
8591
"--jmu=" + main_filename,
8692
test_filename
8793
])
88-
process_results_json(function, "fail", penalty)
94+
_process_results_json(function, "fail", penalty)
8995

9096

9197
def assert_pass(function, main_filename, test_filename, penalty=1):
@@ -102,7 +108,7 @@ def assert_pass(function, main_filename, test_filename, penalty=1):
102108
"--jmu=assert_pass",
103109
test_filename
104110
])
105-
process_results_json(function, "pass", penalty)
111+
_process_results_json(function, "pass", penalty)
106112

107113

108114
def assert_cover(function, main_filename, test_filename, branches=False,

0 commit comments

Comments
 (0)