Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit b38cc2b

Browse files
committed
Add a bit of a test suite
1 parent 84b230f commit b38cc2b

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

tests/fail/random.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import numpy as np
2+
3+
np.random.RandomState(b"hello") # E: incompatible type
4+
np.random.RandomState("") # E: incompatible type
5+
6+
np.random.beta(3) # E: No overload variant
7+
np.random.beta(3, "hello") # E: incompatible type
8+
np.random.beta(3, 4, "hello") # E: incompatible type

tests/pass/random.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import numpy as np
2+
3+
state = np.random.RandomState()
4+
state = np.random.RandomState(3)
5+
state = np.random.RandomState([3])

tests/reveal/random.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import numpy as np
2+
3+
np.random.beta(3, 4.0) # E: float
4+
np.random.beta(3.0, 4.0, size=[3, 4]) # E: ndarray

0 commit comments

Comments
 (0)