We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ac3ced commit cd16368Copy full SHA for cd16368
pandas/tests/test_common.py
@@ -250,10 +250,11 @@ def test_str_size():
250
def test_bz2_missing_import():
251
# Check whether bz2 missing import is handled correctly (issue #53857)
252
code = (
253
+ "import sys\n"
254
+ "assert 'bz2' in sys.modules\n"
255
+ "sys.modules['bz2'] = None\n"
256
"import pytest\n"
- "sys.modules.pop('bz2', None)\n"
- "import pandas\n"
- "assert 'bz2' not in sys.modules\n"
257
+ "import pandas as pd\n"
258
"from pandas.compat import get_bz2_file\n"
259
"msg = 'bz2 module not available.'\n"
260
"with pytest.raises(RuntimeError, match=msg):\n"
0 commit comments