Skip to content

Commit 4c9bcf1

Browse files
committed
don't create temporary stata test files
1 parent 4e6084f commit 4c9bcf1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/io/tests/test_stata.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ def test_write_preserves_original(self):
330330
df = pd.DataFrame(np.random.randn(5,4), columns=list('abcd'))
331331
df.ix[2, 'a':'c'] = np.nan
332332
df_copy = df.copy()
333-
df.to_stata('test.dta', write_index=False)
333+
with tm.ensure_clean() as path:
334+
df.to_stata(path, write_index=False)
334335
tm.assert_frame_equal(df, df_copy)
335336

336337
def test_encoding(self):

0 commit comments

Comments
 (0)