Skip to content

Commit 7585a86

Browse files
committed
marked several snippets as pragma no cover
1 parent f4a9fc6 commit 7585a86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit/test_json.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import pytest
2222

2323
import db_dtypes
24+
import db_dtypes.json
25+
2426

2527
# Check for minimum Pandas version.
2628
pytest.importorskip("pandas", minversion="1.5.0")
@@ -251,7 +253,7 @@ def cleanup_json_module_for_reload():
251253

252254
# Remove the module from sys.modules so importlib.reload which will happen
253255
# after the yield statement will re-execute it
254-
if json_module_name in sys.modules:
256+
if json_module_name in sys.modules: # pragma: NO COVER
255257
del sys.modules[json_module_name]
256258

257259
yield # Run the test that uses this fixture
@@ -260,7 +262,7 @@ def cleanup_json_module_for_reload():
260262
# This helps isolate from other tests that might import db_dtypes.json
261263
if original_module:
262264
sys.modules[json_module_name] = original_module
263-
elif json_module_name in sys.modules:
265+
elif json_module_name in sys.modules: # pragma: NO COVER
264266
# If the test re-imported it but it wasn't there originally, remove it
265267
del sys.modules[json_module_name]
266268

0 commit comments

Comments
 (0)