We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
random.randrange()
1 parent e3b7ec8 commit 1875423Copy full SHA for 1875423
integration_tests/test_random.py
@@ -11,6 +11,15 @@ def test_random():
11
print(r)
12
assert r >= 0.0 and r < 1.0
13
14
+def test_randrange():
15
+ r: i32
16
+ r = random.randrange(0, 10) # [0, 10)
17
+ print(r)
18
+ assert r >= 0 and r < 10
19
+ r = random.randrange(-50, 76) # [-50, 76)
20
21
+ assert r >= -50 and r < 76
22
+
23
def test_randint():
24
ri1: i32
25
ri2: i32
@@ -29,5 +38,6 @@ def test_paretovariate():
29
38
30
39
31
40
test_random()
41
+test_randrange()
32
42
test_randint()
33
43
test_paretovariate()
0 commit comments