kopia lustrzana https://github.com/micropython/micropython-lib
unittest: Always use "raise" with an argument.
So this code can be compiled with the MicroPython native emitter, which does not support "raise" without any arguments. Signed-off-by: Damien George <damien@micropython.org>pull/937/head
rodzic
01047889eb
commit
e4cf09527b
|
@ -1,3 +1,3 @@
|
|||
metadata(version="0.10.3")
|
||||
metadata(version="0.10.4")
|
||||
|
||||
package("unittest")
|
||||
|
|
|
@ -198,7 +198,7 @@ class TestCase:
|
|||
except Exception as e:
|
||||
if isinstance(e, exc):
|
||||
return
|
||||
raise
|
||||
raise e
|
||||
|
||||
assert False, "%r not raised" % exc
|
||||
|
||||
|
@ -407,7 +407,7 @@ def _run_suite(c, test_result: TestResult, suite_name=""):
|
|||
current_test=(name, c), test_result=test_result, exc_info=(type(ex), ex, None)
|
||||
)
|
||||
# Uncomment to investigate failure in detail
|
||||
# raise
|
||||
# raise ex
|
||||
finally:
|
||||
__test_result__ = None
|
||||
__current_test__ = None
|
||||
|
|
Ładowanie…
Reference in New Issue