Skip to content

TST: disable stata tests on big-endian (GH5781) / fix datetime64[ns] comparison on big-endian (GH7265) #7266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions pandas/io/tests/test_stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
from pandas.util.misc import is_little_endian
from pandas import compat

def skip_if_not_little_endian():
if not is_little_endian():
raise nose.SkipTest("known failure of test on non-little endian")
if not is_little_endian():
raise nose.SkipTest("known failure of test_stata on non-little endian")

class TestStata(tm.TestCase):

Expand Down Expand Up @@ -198,8 +197,6 @@ def test_read_dta4(self):
tm.assert_frame_equal(parsed_117, expected)

def test_read_write_dta5(self):
# skip_if_not_little_endian()

original = DataFrame([(np.nan, np.nan, np.nan, np.nan, np.nan)],
columns=['float_miss', 'double_miss', 'byte_miss',
'int_miss', 'long_miss'])
Expand All @@ -212,8 +209,6 @@ def test_read_write_dta5(self):
original)

def test_write_dta6(self):
# skip_if_not_little_endian()

original = self.read_csv(self.csv3)
original.index.name = 'index'
original.index = original.index.astype(np.int32)
Expand Down Expand Up @@ -245,8 +240,6 @@ def test_read_dta9(self):
tm.assert_frame_equal(parsed, expected)

def test_read_write_dta10(self):
# skip_if_not_little_endian()

original = DataFrame(data=[["string", "object", 1, 1.1,
np.datetime64('2003-12-25')]],
columns=['string', 'object', 'integer', 'floating',
Expand Down Expand Up @@ -284,8 +277,6 @@ def test_encoding(self):
self.assertIsInstance(result, unicode)

def test_read_write_dta11(self):
# skip_if_not_little_endian()

original = DataFrame([(1, 2, 3, 4)],
columns=['good', compat.u('b\u00E4d'), '8number', 'astringwithmorethan32characters______'])
formatted = DataFrame([(1, 2, 3, 4)],
Expand All @@ -303,8 +294,6 @@ def test_read_write_dta11(self):
tm.assert_frame_equal(written_and_read_again.set_index('index'), formatted)

def test_read_write_dta12(self):
# skip_if_not_little_endian()

original = DataFrame([(1, 2, 3, 4, 5, 6)],
columns=['astringwithmorethan32characters_1',
'astringwithmorethan32characters_2',
Expand Down
6 changes: 5 additions & 1 deletion pandas/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ def test_value_counts_unique_nunique(self):
# Unable to assign None
continue

values[0:2] = null_obj
# special assign to the numpy array
if o.values.dtype == 'datetime64[ns]':
values[0:2] = pd.tslib.iNaT
else:
values[0:2] = null_obj

# create repeated values, 'n'th element is repeated by n+1 times
if isinstance(o, PeriodIndex):
Expand Down