11
11
from pandas .io import common
12
12
from pandas .compat import is_platform_windows , StringIO
13
13
14
- from pandas import read_csv , read_table , concat
14
+ from pandas import read_csv , concat
15
15
16
16
try :
17
17
from pathlib import Path
@@ -33,7 +33,8 @@ class TestCommonIOCapabilities(tm.TestCase):
33
33
foo2,12,13,14,15
34
34
bar2,12,13,14,15
35
35
"""
36
-
36
+ data2 = data1 .replace ("," , " " )
37
+
37
38
def test_expand_user (self ):
38
39
filename = '~/sometest'
39
40
expanded_name = common ._expand_user (filename )
@@ -90,14 +91,17 @@ def test_iterator(self):
90
91
expected .index = [0 for i in range (len (expected ))]
91
92
tm .assert_frame_equal (concat (it ), expected .iloc [1 :])
92
93
94
+ #13398
93
95
def test_temporary_file (self ):
94
96
from tempfile import TemporaryFile
95
97
new_file = TemporaryFile ("w+" )
96
- new_file .write ("0 0" )
98
+ new_file .write (self . data2 )
97
99
new_file .flush ()
98
100
new_file .seek (0 )
99
101
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 )
101
105
102
106
103
107
class TestMMapWrapper (tm .TestCase ):
0 commit comments