Skip to content

Commit

Permalink
TST: remove patches to pandas.util.testing.N (pandas-dev#24826)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins authored and Pingviinituutti committed Feb 28, 2019
1 parent 13dce53 commit 9c452ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions pandas/tests/indexing/multiindex/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions pandas/tests/plotting/test_datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/series/test_alter_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/test_multilevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 9c452ef

Please sign in to comment.