author | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-03-28 15:51:20 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-03-28 15:52:55 UTC |
parent | ffa89556eda5fc05cd496150880519b575c2908e |
bindings/python/fiu.py | +1 | -1 |
tests/test-failinfo_refcount.py | +3 | -4 |
diff --git a/bindings/python/fiu.py b/bindings/python/fiu.py index 20f4a13..8d06dfa 100644 --- a/bindings/python/fiu.py +++ b/bindings/python/fiu.py @@ -19,7 +19,7 @@ def fail(name): "Returns the failure status of the given point of failure." return _ll.fail(name) -def failinfo(name): +def failinfo(): """Returns the information associated with the last failure. Use with care, can be fatal if the point of failure was not enabled via Python.""" diff --git a/tests/test-failinfo_refcount.py b/tests/test-failinfo_refcount.py index 79062be..a2c0e86 100644 --- a/tests/test-failinfo_refcount.py +++ b/tests/test-failinfo_refcount.py @@ -11,11 +11,10 @@ finfo = [1, 2, 3] fiu.enable('p1', failinfo = finfo) assert fiu.fail('p1') -assert fiu.failinfo('p1') is finfo +assert fiu.failinfo() is finfo finfo_id = id(finfo) del finfo -assert fiu.failinfo('p1') == [1, 2, 3] -assert id(fiu.failinfo('p1')) == finfo_id - +assert fiu.failinfo() == [1, 2, 3] +assert id(fiu.failinfo()) == finfo_id