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 f00158aCopy full SHA for f00158a
pandas/tests/test_common.py
@@ -250,10 +250,10 @@ 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 pytest\n"
254
- "sys.modules.pop('bz2', None)\n"
255
- "import pandas\n"
256
- "assert 'bz2' not in sys.modules\n"
+ "import sys\n"
+ "assert 'bz2' in sys.modules\n"
+ "sys.modules['bz2'] = None\n"
+ "import pandas as pd\n"
257
"from pandas.compat import get_bz2_file\n"
258
"msg = 'bz2 module not available.'\n"
259
"with pytest.raises(RuntimeError, match=msg):\n"
0 commit comments