Skip to content

Commit

Permalink
Fix __name__ access in poc
Browse files Browse the repository at this point in the history
__name__ is an attribute of a class instead of that of an instance.
flp.Valid is an instance, so accessing __name__ will fail with
another exception if the FLP test fails.
  • Loading branch information
junyechen1996 committed Sep 27, 2023
1 parent 510c00c commit cd6aa02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions poc/flp_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,13 +807,13 @@ def test_flp_generic(flp, test_cases):
v = flp.Valid.eval(meas, joint_rand, 1)
if (v == flp.Field(0)) != expected_decision:
print('{}: test {} failed: validity circuit returned {}'.format(
flp.Valid.__name__, i, v))
flp.Valid.__class__.__name__, i, v))

# Run the FLP.
decision = run_flp(flp, meas, 2)
if decision != expected_decision:
print('{}: test {} failed: proof evaluation resulted in {}; want {}'.format(
flp.Valid.__name__, i, decision, expected_decision))
flp.Valid.__class__.__name__, i, decision, expected_decision))


class TestAverage(Sum):
Expand Down

0 comments on commit cd6aa02

Please sign in to comment.