Skip to content

Commit

Permalink
fix units test
Browse files Browse the repository at this point in the history
  • Loading branch information
smichr committed Jan 19, 2012
1 parent f67978b commit 64738fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sympy/physics/tests/test_units.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from sympy import integrate, Rational, sqrt, Symbol
from sympy.physics.units import (au, amu, charge, day, find_unit,
foot, km, m, meter, minute, s,
speed_of_light)
speed_of_light, grams)

def test_units():
assert (5*m/s * day) / km == 432
assert foot / meter == Rational('0.3048')
# amu is a pure mass so mass/mass gives a number, not an amount (mol)
assert str(u.g/(u.amu).n(1)` == '6.e+23'
assert str(grams/(amu).n(1)) == '6.e+23'

# Light from the sun needs about 8.3 minutes to reach earth
t = (1*au / speed_of_light).evalf() / minute
Expand Down

0 comments on commit 64738fd

Please sign in to comment.