mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-17 01:51:39 +09:00
- 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'))
|