Skip to content

Commit fa8325d

Browse files
chore: update test_coverage files
1 parent 3eafcfd commit fa8325d

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

tests/coverage/test_coverage_relative_namespace_packages.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def test_coverage_namespace_package_import_normal():
2323
imports_ns_dot_normal()
2424
ModuleCodeCollector.stop_coverage()
2525

26+
assert ModuleCodeCollector._instance is not None
2627
executable = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance.lines)
2728
covered = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance._get_covered_lines(include_imported=False))
2829
covered_with_imports = _get_relpath_dict(
@@ -79,6 +80,7 @@ def test_coverage_namespace_package_import_late():
7980
imports_ns_dot_late()
8081
ModuleCodeCollector.stop_coverage()
8182

83+
assert ModuleCodeCollector._instance is not None
8284
executable = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance.lines)
8385
covered = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance._get_covered_lines(include_imported=False))
8486
covered_with_imports = _get_relpath_dict(
@@ -150,6 +152,7 @@ def test_coverage_namespace_package_nsa_import_parent_normal():
150152
nsa_imports_parent_normal()
151153
ModuleCodeCollector.stop_coverage()
152154

155+
assert ModuleCodeCollector._instance is not None
153156
executable = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance.lines)
154157
covered = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance._get_covered_lines(include_imported=False))
155158
covered_with_imports = _get_relpath_dict(
@@ -158,14 +161,14 @@ def test_coverage_namespace_package_nsa_import_parent_normal():
158161

159162
expected_executable = {
160163
"tests/coverage/included_path/normal_import_const.py": {1},
161-
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 2, 5, 6, 9, 10, 12},
164+
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 3, 6, 7, 10, 11, 13},
162165
}
163166
expected_covered = {
164-
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {6},
167+
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {7},
165168
}
166169
expected_covered_with_imports = {
167170
"tests/coverage/included_path/normal_import_const.py": {1},
168-
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 2, 5, 6, 9},
171+
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 3, 6, 7, 10},
169172
}
170173

171174
assert executable == expected_executable, (
@@ -200,6 +203,7 @@ def test_coverage_namespace_package_nsa_import_parent_late():
200203
nsa_imports_parent_late()
201204
ModuleCodeCollector.stop_coverage()
202205

206+
assert ModuleCodeCollector._instance is not None
203207
executable = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance.lines)
204208
covered = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance._get_covered_lines(include_imported=False))
205209
covered_with_imports = _get_relpath_dict(
@@ -209,16 +213,16 @@ def test_coverage_namespace_package_nsa_import_parent_late():
209213
expected_executable = {
210214
"tests/coverage/included_path/late_import_const.py": {1},
211215
"tests/coverage/included_path/normal_import_const.py": {1},
212-
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 2, 5, 6, 9, 10, 12},
216+
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 3, 6, 7, 10, 11, 13},
213217
}
214218
expected_covered = {
215219
"tests/coverage/included_path/late_import_const.py": {1},
216-
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {10, 12},
220+
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {11, 13},
217221
}
218222
expected_covered_with_imports = {
219223
"tests/coverage/included_path/late_import_const.py": {1},
220224
"tests/coverage/included_path/normal_import_const.py": {1},
221-
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 2, 5, 9, 10, 12},
225+
"tests/coverage/included_path/nsa/nsa_imports_parent.py": {1, 3, 6, 10, 11, 13},
222226
}
223227

224228
assert executable == expected_executable, (
@@ -253,6 +257,7 @@ def test_coverage_namespace_package_nsa_import_dot_normal():
253257
nsa_imports_dot_normal()
254258
ModuleCodeCollector.stop_coverage()
255259

260+
assert ModuleCodeCollector._instance is not None
256261
executable = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance.lines)
257262
covered = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance._get_covered_lines(include_imported=False))
258263
covered_with_imports = _get_relpath_dict(
@@ -307,6 +312,7 @@ def test_coverage_namespace_package_nsa_import_dot_late():
307312
nsa_imports_dot_late()
308313
ModuleCodeCollector.stop_coverage()
309314

315+
assert ModuleCodeCollector._instance is not None
310316
executable = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance.lines)
311317
covered = _get_relpath_dict(cwd_path, ModuleCodeCollector._instance._get_covered_lines(include_imported=False))
312318
covered_with_imports = _get_relpath_dict(

tests/coverage/test_coverage_relative_regular_packages.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ def test_coverage_regular_package_rpa_import_parent_normal():
186186
expected_executable = {
187187
"tests/coverage/included_path/normal_import_const.py": {1},
188188
"tests/coverage/included_path/rpa/__init__.py": {_empty_init_lineno},
189-
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 2, 5, 6, 9, 10, 12},
189+
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 3, 6, 7, 10, 11, 13},
190190
}
191-
expected_covered = {"tests/coverage/included_path/rpa/rpa_imports_parent.py": {6}}
191+
expected_covered = {"tests/coverage/included_path/rpa/rpa_imports_parent.py": {7}}
192192
expected_covered_with_imports = {
193193
"tests/coverage/included_path/normal_import_const.py": {1},
194194
"tests/coverage/included_path/rpa/__init__.py": {_empty_init_lineno},
195-
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 2, 5, 6, 9},
195+
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 3, 6, 7, 10},
196196
}
197197

198198
assert executable == expected_executable, (
@@ -241,17 +241,17 @@ def test_coverage_regular_package_rpa_import_parent_late():
241241
"tests/coverage/included_path/late_import_const.py": {1},
242242
"tests/coverage/included_path/normal_import_const.py": {1},
243243
"tests/coverage/included_path/rpa/__init__.py": {_empty_init_lineno},
244-
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 2, 5, 6, 9, 10, 12},
244+
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 3, 6, 7, 10, 11, 13},
245245
}
246246
expected_covered = {
247247
"tests/coverage/included_path/late_import_const.py": {1},
248-
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {10, 12},
248+
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {11, 13},
249249
}
250250
expected_covered_with_imports = {
251251
"tests/coverage/included_path/late_import_const.py": {1},
252252
"tests/coverage/included_path/normal_import_const.py": {1},
253253
"tests/coverage/included_path/rpa/__init__.py": {_empty_init_lineno},
254-
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 2, 5, 9, 10, 12},
254+
"tests/coverage/included_path/rpa/rpa_imports_parent.py": {1, 3, 6, 10, 11, 13},
255255
}
256256

257257
assert executable == expected_executable, (

0 commit comments

Comments
 (0)