Skip to content

Commit 2218d6f

Browse files
committed
Skip int(x) keyword tests with Python 3.7
The first argument must be positional since python/cpython@2e56424
1 parent 0527067 commit 2218d6f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_future/test_int.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,17 @@ def test_small_ints(self):
265265
def test_no_args(self):
266266
self.assertEqual(int(), 0)
267267

268-
def test_keyword_args(self):
268+
@unittest.skipIf(sys.version_info >= (3, 7),
269+
"The first parameter must be positional with Python >= 3.7"
270+
)
271+
def test_x_keyword_arg(self):
269272
# Test invoking int() using keyword arguments.
270273
self.assertEqual(int(x=1.2), 1)
271-
self.assertEqual(int('100', base=2), 4)
272274
self.assertEqual(int(x='100', base=2), 4)
273275

276+
def text_base_keyword_arg(self):
277+
self.assertEqual(int('100', base=2), 4)
278+
274279
def test_newint_plus_float(self):
275280
minutes = int(100)
276281
second = 0.0

0 commit comments

Comments
 (0)