Skip to content

Commit 9c63bb1

Browse files
committed
Re-enable more tests
1 parent 09c573d commit 9c63bb1

File tree

5 files changed

+9
-48
lines changed

5 files changed

+9
-48
lines changed

.circleci/setup_env.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ if pip list | grep -q ^pandas; then
5555
fi
5656

5757
echo "Install pandas"
58-
python -m pip install --no-build-isolation -v .
58+
python -m pip install --no-build-isolation -ve .
5959

6060
echo "done"

pandas/tests/api/test_api.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,6 @@ def test_testing(self):
255255

256256
self.check(testing, self.funcs)
257257

258-
def test_util_in_top_level(self, monkeypatch):
259-
# Can't import pandas from the test directory since its not
260-
# built inplace with meson
261-
if pd._built_with_meson:
262-
monkeypatch.chdir("..")
263-
258+
def test_util_in_top_level(self):
264259
with pytest.raises(AttributeError, match="foo"):
265260
pd.util.foo

pandas/tests/io/test_compression.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,9 @@ def test_gzip_reproducibility_file_object():
201201
assert output == buffer.getvalue()
202202

203203

204-
def test_with_missing_lzma(monkeypatch):
204+
def test_with_missing_lzma():
205205
"""Tests if import pandas works when lzma is not present."""
206206
# https://github.com/pandas-dev/pandas/issues/27575
207-
# Can't import pandas from the test directory since its not
208-
# built inplace with meson
209-
if pd._built_with_meson:
210-
monkeypatch.chdir("..")
211207
code = textwrap.dedent(
212208
"""\
213209
import sys
@@ -218,14 +214,10 @@ def test_with_missing_lzma(monkeypatch):
218214
subprocess.check_output([sys.executable, "-c", code], stderr=subprocess.PIPE)
219215

220216

221-
def test_with_missing_lzma_runtime(monkeypatch):
217+
def test_with_missing_lzma_runtime():
222218
"""Tests if RuntimeError is hit when calling lzma without
223219
having the module available.
224220
"""
225-
# Can't import pandas from the test directory since its not
226-
# built inplace with meson
227-
if pd._built_with_meson:
228-
monkeypatch.chdir("..")
229221
code = textwrap.dedent(
230222
"""
231223
import sys

pandas/tests/plotting/test_converter.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
PeriodIndex,
1717
Series,
1818
Timestamp,
19-
_built_with_meson,
2019
arrays,
2120
date_range,
2221
)
@@ -44,12 +43,8 @@
4443
dates = pytest.importorskip("matplotlib.dates")
4544

4645

47-
def test_registry_mpl_resets(monkeypatch):
46+
def test_registry_mpl_resets():
4847
# Check that Matplotlib converters are properly reset (see issue #27481)
49-
# Can't import pandas from the test directory since its not
50-
# built inplace with meson
51-
if _built_with_meson:
52-
monkeypatch.chdir("..")
5348
code = (
5449
"import matplotlib.units as units; "
5550
"import matplotlib.dates as mdates; "
@@ -68,11 +63,7 @@ def test_timtetonum_accepts_unicode():
6863

6964

7065
class TestRegistration:
71-
def test_dont_register_by_default(self, monkeypatch):
72-
# Can't import pandas from the test directory since its not
73-
# built inplace with meson
74-
if _built_with_meson:
75-
monkeypatch.chdir("..")
66+
def test_dont_register_by_default(self):
7667
# Run in subprocess to ensure a clean state
7768
code = (
7869
"import matplotlib.units; "

pandas/tests/test_downstream.py

+3-20
Original file line numberDiff line numberDiff line change
@@ -130,21 +130,13 @@ def test_xarray_cftimeindex_nearest():
130130
assert result == expected
131131

132132

133-
def test_oo_optimizable(monkeypatch):
133+
def test_oo_optimizable():
134134
# GH 21071
135-
# Can't import pandas from the test directory since its not
136-
# built inplace with meson
137-
if pd._built_with_meson:
138-
monkeypatch.chdir("..")
139135
subprocess.check_call([sys.executable, "-OO", "-c", "import pandas"])
140136

141137

142-
def test_oo_optimized_datetime_index_unpickle(monkeypatch):
138+
def test_oo_optimized_datetime_index_unpickle():
143139
# GH 42866
144-
# Can't import pandas from the test directory since its not
145-
# built inplace with meson
146-
if pd._built_with_meson:
147-
monkeypatch.chdir("..")
148140
subprocess.check_call(
149141
[
150142
sys.executable,
@@ -245,11 +237,7 @@ def test_yaml_dump(df):
245237
tm.assert_frame_equal(df, loaded2)
246238

247239

248-
def test_missing_required_dependency(monkeypatch):
249-
# TODO: This test is basically disabled until we have
250-
# editable installs in meson-python. Re-enable this when
251-
# that happens.
252-
240+
def test_missing_required_dependency():
253241
# GH 23868
254242
# To ensure proper isolation, we pass these flags
255243
# -S : disable site-packages
@@ -262,11 +250,6 @@ def test_missing_required_dependency(monkeypatch):
262250
# We skip this test if pandas is installed as a site package. We first
263251
# import the package normally and check the path to the module before
264252
# executing the test which imports pandas with site packages disabled.
265-
266-
# Can't import pandas from the test directory since its not
267-
# built inplace with meson
268-
if pd._built_with_meson:
269-
monkeypatch.chdir("..")
270253
call = [pyexe, "-c", "import pandas;print(pandas.__file__)"]
271254
output = subprocess.check_output(call).decode()
272255
if "site-packages" in output:

0 commit comments

Comments
 (0)