Skip to content

Commit c7f37fc

Browse files
committed
TST: remove some 3.6 warnings
1 parent 2f7532c commit c7f37fc

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

pandas/core/groupby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ def is_in_obj(gpr):
24662466
"Defaulting to column but "
24672467
"this will raise an ambiguity error in a "
24682468
"future version") % gpr,
2469-
FutureWarning, stacklevel=2)
2469+
FutureWarning, stacklevel=3)
24702470
in_axis, name, gpr = True, gpr, obj[gpr]
24712471
exclusions.append(name)
24722472
elif gpr in obj.index.names:

pandas/io/tests/parser/test_unsupported.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ def test_c_engine(self):
6969
msg = 'Error tokenizing data'
7070

7171
with tm.assertRaisesRegexp(ParserError, msg):
72-
read_table(StringIO(text), sep='\s+')
72+
read_table(StringIO(text), sep='\\s+')
7373
with tm.assertRaisesRegexp(ParserError, msg):
74-
read_table(StringIO(text), engine='c', sep='\s+')
74+
read_table(StringIO(text), engine='c', sep='\\s+')
7575

7676
msg = "Only length-1 thousands markers supported"
7777
data = """A|B|C

pandas/sparse/tests/test_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def test_astype(self):
361361
arr.astype('i8')
362362

363363
arr = SparseArray([0, np.nan, 0, 1], fill_value=0)
364-
msg = 'Cannot convert non-finite values \(NA or inf\) to integer'
364+
msg = 'Cannot convert non-finite values \\(NA or inf\\) to integer'
365365
with tm.assertRaisesRegexp(ValueError, msg):
366366
arr.astype('i8')
367367

@@ -708,7 +708,7 @@ def test_cumsum(self):
708708
tm.assert_sp_array_equal(out, expected)
709709

710710
axis = 1 # SparseArray currently 1-D, so only axis = 0 is valid.
711-
msg = "axis\(={axis}\) out of bounds".format(axis=axis)
711+
msg = "axis\\(={axis}\\) out of bounds".format(axis=axis)
712712
with tm.assertRaisesRegexp(ValueError, msg):
713713
SparseArray(data).cumsum(axis=axis)
714714

pandas/tests/frame/test_dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def test_astype_cast_nan_inf_int(self):
390390
# GH14265, check nan and inf raise error when converting to int
391391
types = [np.int32, np.int64]
392392
values = [np.nan, np.inf]
393-
msg = 'Cannot convert non-finite values \(NA or inf\) to integer'
393+
msg = 'Cannot convert non-finite values \\(NA or inf\\) to integer'
394394

395395
for this_type in types:
396396
for this_val in values:

pandas/tests/series/test_dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_astype_cast_nan_inf_int(self):
4646
# GH14265, check nan and inf raise error when converting to int
4747
types = [np.int32, np.int64]
4848
values = [np.nan, np.inf]
49-
msg = 'Cannot convert non-finite values \(NA or inf\) to integer'
49+
msg = 'Cannot convert non-finite values \\(NA or inf\\) to integer'
5050

5151
for this_type in types:
5252
for this_val in values:

0 commit comments

Comments
 (0)