You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PySet_Pop that’s run as part of the test_set_pop will return NULL and set the global exception state (raise an exception) when the set is empty. We handle the NULL case and return an Option<T>, but the exception state remains set.
Given that the convention in PyO3 is to convert exceptions to return values, this can be very misleading. In particular, this causes the test suite to fail further along when one of the tests invokes py.eval and then converts this exception to a Result.
To reproduce try: cargo test --lib -- --test-threads=1.
The text was updated successfully, but these errors were encountered:
Discovered by running the test suite locally.
The
PySet_Pop
that’s run as part of thetest_set_pop
will return NULL and set the global exception state (raise an exception) when the set is empty. We handle theNULL
case and return anOption<T>
, but the exception state remains set.Given that the convention in PyO3 is to convert exceptions to return values, this can be very misleading. In particular, this causes the test suite to fail further along when one of the tests invokes
py.eval
and then converts this exception to aResult
.To reproduce try:
cargo test --lib -- --test-threads=1
.The text was updated successfully, but these errors were encountered: