Skip to content

Commit 2335cee

Browse files
committed
TST: Construct DataFrame specifically for test, instead of reusing existing one.
1 parent 335cf86 commit 2335cee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/io/tests/test_excel.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1332,10 +1332,10 @@ def test_to_excel_multiindex(self):
13321332
def test_to_excel_multiindex_nan_label(self):
13331333
_skip_if_no_xlrd()
13341334

1335-
frame = self.frame
1336-
frame.A = np.arange(len(frame))
1337-
frame.iloc[0, 0] = None
1338-
frame.set_index(['A', 'B'], inplace=True)
1335+
frame = pd.DataFrame({'A': [None, 2, 3],
1336+
'B': [10, 20, 30],
1337+
'C': np.random.sample(3)})
1338+
frame = frame.set_index(['A', 'B'])
13391339

13401340
with ensure_clean(self.ext) as path:
13411341
frame.to_excel(path, merge_cells=self.merge_cells)

0 commit comments

Comments
 (0)