diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2016-09-19 13:32:29 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2016-09-19 13:32:29 -0700 |
| commit | bb03afdb77c95b9cb23e531e5763167ccb09c8e4 (patch) | |
| tree | 509722778a03b10c933963a35c93eb5670a5cdb5 /tests/extmod/urandom_basic.py | |
| parent | 345dd1484c4e68f53ea242c5778a2de99119db9a (diff) | |
| parent | 60592fd23c8acd4ed4f70d8fbe8f8b11ea58082c (diff) | |
Merge remote-tracking branch 'micropython/master'
Diffstat (limited to 'tests/extmod/urandom_basic.py')
| -rw-r--r-- | tests/extmod/urandom_basic.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/extmod/urandom_basic.py b/tests/extmod/urandom_basic.py index 7e4d8bf34..bf00035bd 100644 --- a/tests/extmod/urandom_basic.py +++ b/tests/extmod/urandom_basic.py @@ -17,3 +17,9 @@ random.seed(1) r = random.getrandbits(16) random.seed(1) print(random.getrandbits(16) == r) + +# check that it throws an error for zero bits +try: + random.getrandbits(0) +except ValueError: + print('ValueError') |
