Skip to content

Commit

Permalink
Add test for dimension in cos()
Browse files Browse the repository at this point in the history
  • Loading branch information
schymans committed Oct 20, 2020
1 parent bf2a9df commit 0baa970
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_equations.py
Expand Up @@ -11,7 +11,7 @@
derive_baseunit)
from essm.variables.utils import (extract_variables, replace_defaults,
replace_variables)
from sympy import Derivative, exp, log, S, Symbol, solve, sqrt
from sympy import cos, Derivative, exp, log, S, Symbol, solve, sqrt
from sympy.physics.units import Quantity, length, meter


Expand Down Expand Up @@ -114,12 +114,19 @@ class valid_units(Equation):


def test_units_exp():
"""Check units in exp. SHOULD FAIL!"""
"""Check units in exp."""

class valid_units_exp(Equation):
expr = Eq(demo_d/demo_d1, exp(demo_1))


def test_units_cos():
"""Check units in cos."""

class valid_units_exp(Equation):
expr = Eq(1, 1/(cos(demo_1)))


def test_integrate():
"""Test that variables can be used as integration symbols."""
from sympy import integrate
Expand Down

0 comments on commit 0baa970

Please sign in to comment.