Skip to content

Commit

Permalink
Merge pull request #40 from wilcoxjd/utilsCoverage
Browse files Browse the repository at this point in the history
Add new test to improve coverage.
  • Loading branch information
ntouran committed Mar 19, 2020
2 parents 6de79e7 + c0405b2 commit 6206678
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions armi/utils/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ def test_fixThreeDigitExp(self):
fixed = utils.fixThreeDigitExp("-2.4594981981654-101")
self.assertEqual(-2.4594981981654e-101, fixed)

def test_capStrLen(self):
#Test with strings
str1 = utils.capStrLen('sodium', 5)
self.assertEqual('so...', str1)
str1 = utils.capStrLen("potassium", 6)
self.assertEqual('pot...', str1)
str1 = utils.capStrLen('rubidium', 7)
self.assertEqual('rubi...', str1)

class TestUnits(unittest.TestCase):
def setUp(self):
Expand Down

0 comments on commit 6206678

Please sign in to comment.