Skip to content

Commit

Permalink
Added reference to original issue in the test + test the result itsel…
Browse files Browse the repository at this point in the history
…f (assuming that previous test is OK)
  • Loading branch information
mbrucher committed Jun 18, 2016
1 parent 5af8465 commit 119fb65
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pandas/io/tests/test_common.py
Expand Up @@ -11,7 +11,7 @@
from pandas.io import common
from pandas.compat import is_platform_windows, StringIO

from pandas import read_csv, read_table, concat
from pandas import read_csv, concat

try:
from pathlib import Path
Expand All @@ -33,7 +33,8 @@ class TestCommonIOCapabilities(tm.TestCase):
foo2,12,13,14,15
bar2,12,13,14,15
"""

data2 = data1.replace(",", " ")

def test_expand_user(self):
filename = '~/sometest'
expanded_name = common._expand_user(filename)
Expand Down Expand Up @@ -90,14 +91,17 @@ def test_iterator(self):
expected.index = [0 for i in range(len(expected))]
tm.assert_frame_equal(concat(it), expected.iloc[1:])

#13398
def test_temporary_file(self):
from tempfile import TemporaryFile
new_file = TemporaryFile("w+")
new_file.write("0 0")
new_file.write(self.data2)
new_file.flush()
new_file.seek(0)

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


class TestMMapWrapper(tm.TestCase):
Expand Down

0 comments on commit 119fb65

Please sign in to comment.