diff --git a/pandas/tests/indexing/multiindex/conftest.py b/pandas/tests/indexing/multiindex/conftest.py index 046fc19c0d9c8c..545e092d9ce651 100644 --- a/pandas/tests/indexing/multiindex/conftest.py +++ b/pandas/tests/indexing/multiindex/conftest.py @@ -21,8 +21,7 @@ def multiindex_dataframe_random_data(): def multiindex_year_month_day_dataframe_random_data(): """DataFrame with 3 level MultiIndex (year, month, day) covering first 100 business days from 2000-01-01 with random data""" - tm.N = 100 - tdf = tm.makeTimeDataFrame() + tdf = tm.makeTimeDataFrame(100) ymd = tdf.groupby([lambda x: x.year, lambda x: x.month, lambda x: x.day]).sum() # use Int64Index, to make sure things work diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py index c78ab41d2fae4a..ad79cc97f8b778 100644 --- a/pandas/tests/plotting/test_datetimelike.py +++ b/pandas/tests/plotting/test_datetimelike.py @@ -313,10 +313,7 @@ def test_business_freq(self): @pytest.mark.slow def test_business_freq_convert(self): - n = tm.N - tm.N = 300 - bts = tm.makeTimeSeries().asfreq('BM') - tm.N = n + bts = tm.makeTimeSeries(300).asfreq('BM') ts = bts.to_period('M') _, ax = self.plt.subplots() bts.plot(ax=ax) diff --git a/pandas/tests/series/test_alter_axes.py b/pandas/tests/series/test_alter_axes.py index cd4c0a7924d392..04c54bcf8c22cd 100644 --- a/pandas/tests/series/test_alter_axes.py +++ b/pandas/tests/series/test_alter_axes.py @@ -22,8 +22,8 @@ def test_setindex(self, string_series): string_series.index = None # wrong length - msg = (r"Length mismatch: Expected axis has (30|100) elements, new" - r" values have (29|99) elements") + msg = ("Length mismatch: Expected axis has 30 elements, new" + " values have 29 elements") with pytest.raises(ValueError, match=msg): string_series.index = np.arange(len(string_series) - 1) diff --git a/pandas/tests/test_multilevel.py b/pandas/tests/test_multilevel.py index b5023c376dedd5..a7bbbbb5033acb 100644 --- a/pandas/tests/test_multilevel.py +++ b/pandas/tests/test_multilevel.py @@ -47,8 +47,7 @@ def setup_method(self, method): s[3] = np.NaN self.series = s - tm.N = 100 - self.tdf = tm.makeTimeDataFrame() + self.tdf = tm.makeTimeDataFrame(100) self.ymd = self.tdf.groupby([lambda x: x.year, lambda x: x.month, lambda x: x.day]).sum()