Skip to content

Commit

Permalink
Fix __or__ logic
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Nov 20, 2023
1 parent 964e07f commit 6e3fbeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion fault/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def __call__(self, *args):
stable = Function("$stable")


class PropertyUnaryOp:
class PropertyUnaryOp(Expression):
pass


Expand All @@ -328,6 +328,11 @@ class Not(PropertyUnaryOp):
def __init__(self, arg):
self.arg = arg

def __or__(self, other):
if isinstance(other, Property):
return other.__ror__(self)
return super().__or__(self)


def not_(arg):
return Not(arg)
4 changes: 2 additions & 2 deletions tests/test_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

def requires_ncsim(test_fn):
def wrapper(test_fn, *args, **kwargs):
if not shutil.which("ncsim"):
return pytest.skip("need ncsim for SVA test")
# if not shutil.which("ncsim"):
# return pytest.skip("need ncsim for SVA test")
return test_fn(*args, **kwargs)
return decorator.decorator(wrapper, test_fn)

Expand Down

0 comments on commit 6e3fbeb

Please sign in to comment.