Skip to content

Commit ccde0a8

Browse files
simonjayhawkinsWillAyd
authored andcommitted
TST: remove patches to pandas.util.testing.N (#24826)
1 parent 08f92c4 commit ccde0a8

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

pandas/tests/indexing/multiindex/conftest.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ def multiindex_dataframe_random_data():
2121
def multiindex_year_month_day_dataframe_random_data():
2222
"""DataFrame with 3 level MultiIndex (year, month, day) covering
2323
first 100 business days from 2000-01-01 with random data"""
24-
tm.N = 100
25-
tdf = tm.makeTimeDataFrame()
24+
tdf = tm.makeTimeDataFrame(100)
2625
ymd = tdf.groupby([lambda x: x.year, lambda x: x.month,
2726
lambda x: x.day]).sum()
2827
# use Int64Index, to make sure things work

pandas/tests/plotting/test_datetimelike.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,7 @@ def test_business_freq(self):
313313

314314
@pytest.mark.slow
315315
def test_business_freq_convert(self):
316-
n = tm.N
317-
tm.N = 300
318-
bts = tm.makeTimeSeries().asfreq('BM')
319-
tm.N = n
316+
bts = tm.makeTimeSeries(300).asfreq('BM')
320317
ts = bts.to_period('M')
321318
_, ax = self.plt.subplots()
322319
bts.plot(ax=ax)

pandas/tests/series/test_alter_axes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def test_setindex(self, string_series):
2222
string_series.index = None
2323

2424
# wrong length
25-
msg = (r"Length mismatch: Expected axis has (30|100) elements, new"
26-
r" values have (29|99) elements")
25+
msg = ("Length mismatch: Expected axis has 30 elements, new"
26+
" values have 29 elements")
2727
with pytest.raises(ValueError, match=msg):
2828
string_series.index = np.arange(len(string_series) - 1)
2929

pandas/tests/test_multilevel.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def setup_method(self, method):
4747
s[3] = np.NaN
4848
self.series = s
4949

50-
tm.N = 100
51-
self.tdf = tm.makeTimeDataFrame()
50+
self.tdf = tm.makeTimeDataFrame(100)
5251
self.ymd = self.tdf.groupby([lambda x: x.year, lambda x: x.month,
5352
lambda x: x.day]).sum()
5453

0 commit comments

Comments
 (0)