Skip to content

Commit 2fea3ed

Browse files
committed
random.choices is not available in 3.4 yet
1 parent da34991 commit 2fea3ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ def test_sample_on_dicts(self):
133133
self.assertRaises(TypeError, self.gen.sample, dict.fromkeys('abcdef'), 2)
134134

135135
def test_choices(self):
136+
import sys
137+
if sys.version_info.minor < 6:
138+
return
139+
136140
choices = self.gen.choices
137141
data = ['red', 'green', 'blue', 'yellow']
138142
str_data = 'abcd'

0 commit comments

Comments
 (0)