diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 187a5f5d55533..b67a1be8d43d6 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -561,7 +561,7 @@ def _read_header(self): raise ValueError("Version of given Stata file is not 104, " "105, 108, 113 (Stata 8/9), 114 (Stata " "10/11), 115 (Stata 12) or 117 (Stata 13)") - self.byteorder = self.path_or_buf.read(1) == 0x1 and '>' or '<' + self.byteorder = struct.unpack('b', self.path_or_buf.read(1))[0] == 0x1 and '>' or '<' self.filetype = struct.unpack('b', self.path_or_buf.read(1))[0] self.path_or_buf.read(1) # unused diff --git a/pandas/io/tests/test_stata.py b/pandas/io/tests/test_stata.py index a83f8b3a9521f..b4be08c6b1106 100644 --- a/pandas/io/tests/test_stata.py +++ b/pandas/io/tests/test_stata.py @@ -19,9 +19,6 @@ from pandas.util.misc import is_little_endian from pandas import compat -if not is_little_endian(): - raise nose.SkipTest("known failure of test_stata on non-little endian") - class TestStata(tm.TestCase): def setUp(self):