Skip to content
Snippets Groups Projects
Commit 452bedd4 authored by Markus Holzer's avatar Markus Holzer
Browse files

Two more tests

parent c539b58c
Branches
No related tags found
1 merge request!309Improve FLOP counting function
...@@ -177,6 +177,17 @@ def test_count_operations(): ...@@ -177,6 +177,17 @@ def test_count_operations():
ops = count_operations(expr, only_type=None) ops = count_operations(expr, only_type=None)
assert ops['muls'] == 99 assert ops['muls'] == 99
expr = DivFunc(1, sp.UnevaluatedExpr(sp.Mul(*[x]*100, evaluate=False)))
ops = count_operations(expr, only_type=None)
assert ops['divs'] == 1
assert ops['muls'] == 99
expr = DivFunc(y + z, sp.UnevaluatedExpr(sp.Mul(*[x]*100, evaluate=False)))
ops = count_operations(expr, only_type=None)
assert ops['adds'] == 1
assert ops['divs'] == 1
assert ops['muls'] == 99
def test_common_denominator(): def test_common_denominator():
x = sympy.symbols('x') x = sympy.symbols('x')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment