diff options
| author | Bas van Beek <b.f.van.beek@vu.nl> | 2020-10-15 13:13:05 +0200 |
|---|---|---|
| committer | Bas van Beek <b.f.van.beek@vu.nl> | 2020-10-15 13:13:05 +0200 |
| commit | 50e09dbffba0d8f0b1682c3ed570885cae68fdbb (patch) | |
| tree | 9e763fbc9fbeb1cbadd282afd641b026c9808089 /numpy | |
| parent | 7decfcf481abfc823b2bb6df966088383d6695a5 (diff) | |
| download | numpy-50e09dbffba0d8f0b1682c3ed570885cae68fdbb.tar.gz | |
TST: Updated the typing tests
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/typing/tests/data/fail/constants.py | 6 | ||||
| -rw-r--r-- | numpy/typing/tests/data/reveal/constants.py | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/numpy/typing/tests/data/fail/constants.py b/numpy/typing/tests/data/fail/constants.py new file mode 100644 index 000000000..67ee0e0bc --- /dev/null +++ b/numpy/typing/tests/data/fail/constants.py @@ -0,0 +1,6 @@ +import numpy as np + +np.Inf = np.Inf # E: Cannot assign to final +np.ALLOW_THREADS = np.ALLOW_THREADS # E: Cannot assign to final +np.little_endian = np.little_endian # E: Cannot assign to final +np.UFUNC_PYVALS_NAME = np.UFUNC_PYVALS_NAME # E: Cannot assign to final diff --git a/numpy/typing/tests/data/reveal/constants.py b/numpy/typing/tests/data/reveal/constants.py index 8e00810bd..dc5803974 100644 --- a/numpy/typing/tests/data/reveal/constants.py +++ b/numpy/typing/tests/data/reveal/constants.py @@ -40,5 +40,10 @@ reveal_type(np.SHIFT_OVERFLOW) # E: int reveal_type(np.SHIFT_UNDERFLOW) # E: int reveal_type(np.UFUNC_BUFSIZE_DEFAULT) # E: int reveal_type(np.WRAP) # E: int -reveal_type(np.little_endian) # E: int reveal_type(np.tracemalloc_domain) # E: int + +reveal_type(np.little_endian) # E: bool +reveal_type(np.True_) # E: numpy.bool_ +reveal_type(np.False_) # E: numpy.bool_ + +reveal_type(np.UFUNC_PYVALS_NAME) # E: str |
