Skip to content

Commit 119fb65

Browse files
committed
Added reference to original issue in the test + test the result itself (assuming that previous test is OK)
1 parent 5af8465 commit 119fb65

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pandas/io/tests/test_common.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pandas.io import common
1212
from pandas.compat import is_platform_windows, StringIO
1313

14-
from pandas import read_csv, read_table, concat
14+
from pandas import read_csv, concat
1515

1616
try:
1717
from pathlib import Path
@@ -33,7 +33,8 @@ class TestCommonIOCapabilities(tm.TestCase):
3333
foo2,12,13,14,15
3434
bar2,12,13,14,15
3535
"""
36-
36+
data2 = data1.replace(",", " ")
37+
3738
def test_expand_user(self):
3839
filename = '~/sometest'
3940
expanded_name = common._expand_user(filename)
@@ -90,14 +91,17 @@ def test_iterator(self):
9091
expected.index = [0 for i in range(len(expected))]
9192
tm.assert_frame_equal(concat(it), expected.iloc[1:])
9293

94+
#13398
9395
def test_temporary_file(self):
9496
from tempfile import TemporaryFile
9597
new_file = TemporaryFile("w+")
96-
new_file.write("0 0")
98+
new_file.write(self.data2)
9799
new_file.flush()
98100
new_file.seek(0)
99101

100-
dataframe = read_table(new_file, sep=r"\s+", header=None, engine="python")
102+
result = read_csv(new_file, sep=r"\s+", engine="python")
103+
expected = read_csv(StringIO(self.data1))
104+
tm.assert_frame_equal(result, expected)
101105

102106

103107
class TestMMapWrapper(tm.TestCase):

0 commit comments

Comments
 (0)