forked from Rust-related/RustPython
- Move assert_raises to testutils - Add optional message argument, with reasonable default - Reverse order of expr and exception type for readability - Lambda argument no longer takes parameter - Convert applicable snippets to use assert_raises
7 lines
158 B
Python
7 lines
158 B
Python
from testutils import assert_raises
|
|
|
|
assert hex(16) == '0x10'
|
|
assert hex(-16) == '-0x10'
|
|
|
|
assert_raises(TypeError, lambda: hex({}), 'ord() called with dict')
|