Skip to content

Commit cfa5a45

Browse files
committed
fix additional cases hit by grep
1 parent fc8875a commit cfa5a45

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

pandas/_version.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import re
1313
import subprocess
1414
import sys
15+
from pandas.compat import PY3
1516

1617

1718
def get_keywords():
@@ -83,7 +84,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
8384
print("unable to find command, tried %s" % (commands,))
8485
return None
8586
stdout = p.communicate()[0].strip()
86-
if sys.version_info[0] >= 3:
87+
if PY3:
8788
stdout = stdout.decode()
8889
if p.returncode != 0:
8990
if verbose:

pandas/tests/io/formats/test_format.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1256,8 +1256,6 @@ def test_to_string_float_formatting(self):
12561256

12571257
df_s = df.to_string()
12581258

1259-
# Python 2.5 just wants me to be sad. And debian 32-bit
1260-
# sys.version_info[0] == 2 and sys.version_info[1] < 6:
12611259
if _three_digit_exp():
12621260
expected = (' x\n0 0.00000e+000\n1 2.50000e-001\n'
12631261
'2 3.45600e+003\n3 1.20000e+046\n4 1.64000e+006\n'
@@ -1281,8 +1279,7 @@ def test_to_string_float_formatting(self):
12811279

12821280
df = DataFrame({'x': [1e9, 0.2512]})
12831281
df_s = df.to_string()
1284-
# Python 2.5 just wants me to be sad. And debian 32-bit
1285-
# sys.version_info[0] == 2 and sys.version_info[1] < 6:
1282+
12861283
if _three_digit_exp():
12871284
expected = (' x\n'
12881285
'0 1.000000e+009\n'

pandas/tests/io/parser/common.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,7 @@ def test_verbose_import(self):
12771277

12781278
def test_iteration_open_handle(self):
12791279
if PY3:
1280-
pytest.skip(
1281-
"won't work in Python 3 {0}".format(sys.version_info))
1280+
pytest.skip("won't work in Python 3")
12821281

12831282
with tm.ensure_clean() as path:
12841283
with open(path, 'wb') as f:

0 commit comments

Comments
 (0)