Feat: Few tests for Expression generator
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
5b0d0e5d1e
commit
9919dd77f6
15
test/calculus/random/test_expression_generator.py
Normal file
15
test/calculus/random/test_expression_generator.py
Normal file
@ -0,0 +1,15 @@
|
||||
import mapytex
|
||||
|
||||
def test_generate_expression():
|
||||
random_expression = mapytex.random.expression("{a}+{b}")
|
||||
assert type(random_expression).__name__ == "Expression"
|
||||
random_expression = mapytex.random.expression("{a}/{b}")
|
||||
assert type(random_expression).__name__ == "Fraction"
|
||||
|
||||
def test_generate_expression_calculus():
|
||||
random_expression = mapytex.random.expression("{a}+{a*b}")
|
||||
assert type(random_expression).__name__ == "Expression"
|
||||
random_expression = mapytex.random.expression("{a}/{a*b}")
|
||||
assert type(random_expression).__name__ == "Fraction"
|
||||
assert random_expression.denominator / random_expression.numerator >=1
|
||||
|
Loading…
Reference in New Issue
Block a user