@@ -249,16 +249,16 @@ def cleanup_json_module_for_reload():
249
249
pass # Already registered is the state we want before the test runs
250
250
251
251
# Remove the module from sys.modules so importlib.reload re-executes it
252
- if json_module_name in sys .modules : # COVERAGE FAIL: 252->255
252
+ if json_module_name in sys .modules : # COVERAGE FAIL: 252->255
253
253
del sys .modules [json_module_name ]
254
254
255
255
yield # Run the test that uses this fixture
256
256
257
257
# Cleanup: Put the original module back if it existed
258
258
# This helps isolate from other tests that might import db_dtypes.json
259
- if original_module : # COVERAGE FAIL: 259-261
259
+ if original_module : # COVERAGE FAIL: 259-261
260
260
sys .modules [json_module_name ] = original_module
261
- elif json_module_name in sys .modules : # COVERAGE FAIL: 261->exit
261
+ elif json_module_name in sys .modules : # COVERAGE FAIL: 261->exit
262
262
# If the test re-imported it but it wasn't there originally, remove it
263
263
del sys .modules [json_module_name ]
264
264
@@ -275,7 +275,7 @@ def test_json_arrow_type_reregistration_is_handled(cleanup_json_module_for_reloa
275
275
# Re-importing the module after the fixture removed it from sys.modules
276
276
# forces Python to execute the module's top-level code again.
277
277
# This includes the pa.register_extension_type call.
278
-
278
+
279
279
assert "db_dtypes.json" not in sys .modules
280
280
try :
281
281
import db_dtypes .json # noqa: F401
@@ -284,7 +284,7 @@ def test_json_arrow_type_reregistration_is_handled(cleanup_json_module_for_reloa
284
284
True
285
285
), "Module re-import completed without error, except block likely worked."
286
286
287
- except pa .ArrowKeyError : # COVERAGE FAIL: 287-294
287
+ except pa .ArrowKeyError : # COVERAGE FAIL: 287-294
288
288
# If this exception escapes, the except block in db_dtypes/json.py failed.
289
289
pytest .fail (
290
290
"pa.ArrowKeyError was raised during module reload, "
0 commit comments