Skip to content

Commit 9cb4aa6

Browse files
committed
Add test for creating tuple out of sys.version_info
1 parent 3ca5511 commit 9cb4aa6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_tuple.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
# Copyright (C) 1996-2017 Python Software Foundation
33
#
44
# Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
5+
import sys
6+
57
import seq_tests
6-
#import pickle
78
from compare import CompareTest
89

10+
911
class TupleTest(seq_tests.CommonTest):
1012

1113
type2test = tuple
@@ -22,6 +24,9 @@ def test_constructors(self):
2224
self.assertEqual(tuple(''), ())
2325
self.assertEqual(tuple('spam'), ('s', 'p', 'a', 'm'))
2426

27+
def test_from_subclass(self):
28+
self.assertIs(type(tuple(sys.version_info)), tuple)
29+
2530
def test_literal(self):
2631
self.assertEqual((1,2,3), (*[1,2,3],))
2732

0 commit comments

Comments
 (0)