forked from open-atmos/PyPartMC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_units.py
51 lines (40 loc) · 1.04 KB
/
test_units.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import PyPartMC as ppmc
# pylint: disable=no-member
class TestUnits:
@staticmethod
def test_length():
assert ppmc.si.m == 1
assert ppmc.si.cm == 0.01
assert ppmc.si.um == 1e-6
@staticmethod
def test_temperatur():
assert ppmc.si.K == 1
assert ppmc.si.pK == 1e-12
@staticmethod
def test_time():
assert ppmc.si.s == 1
assert ppmc.si.us == 1e-6
@staticmethod
def test_pressure():
assert ppmc.si.Pa == 1
assert ppmc.si.hPa == 100
@staticmethod
def test_amount():
assert ppmc.si.mol == 1
assert ppmc.si.Tmol == 1e12
@staticmethod
def test_mass():
assert ppmc.si.kg == 1
assert ppmc.si.g == 1e-3
@staticmethod
def test_energy():
assert ppmc.si.J == 1
assert ppmc.si.MJ == 1e6
@staticmethod
def test_force():
assert ppmc.si.N == 1
assert ppmc.si.GN == 1e9
@staticmethod
def test_work():
assert ppmc.si.W == 1
assert ppmc.si.uW == 1e-6