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
157 B
Python
7 lines
157 B
Python
from testutils import assert_raises
|
|
|
|
fd = open('README.md')
|
|
assert 'RustPython' in fd.read()
|
|
|
|
assert_raises(FileNotFoundError, lambda: open('DoesNotExist'))
|