-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST: Add tests for R283 and minor refractoring for G704.
- Loading branch information
1 parent
c403d0f
commit ccf4b3e
Showing
2 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
r"""Test R283""" | ||
import unittest | ||
from .. import r283 | ||
|
||
|
||
class TestH2O(unittest.TestCase): | ||
r"""Test module r283 from pyiapws library.""" | ||
def test_Tc_H2O(self): | ||
expected = 647.096 | ||
value = r283.Tc_H2O | ||
self.assertAlmostEqual(value, expected, places=3) | ||
def test_pc_H2O(self): | ||
expected = 22.064 | ||
value = r283.pc_H2O | ||
self.assertAlmostEqual(value, expected, places=3) | ||
def test_rhoc_H2O(self): | ||
expected = 322.0 | ||
value = r283.rhoc_H2O | ||
self.assertAlmostEqual(value, expected, places=1) | ||
|
||
class TestD2O(unittest.TestCase): | ||
r"""Test module r283 from pyiapws library.""" | ||
def test_Tc_D2O(self): | ||
expected = 643.847 | ||
value = r283.Tc_D2O | ||
self.assertAlmostEqual(value, expected, places=3) | ||
def test_pc_D2O(self): | ||
expected = 21.671 | ||
value = r283.pc_D2O | ||
self.assertAlmostEqual(value, expected, places=3) | ||
def test_rhoc_D2O(self): | ||
expected = 356.0 | ||
value = r283.rhoc_D2O | ||
self.assertAlmostEqual(value, expected, places=1) | ||
|