Skip to content

Commit

Permalink
adding documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Sep 10, 2024
1 parent 68a671e commit 29089cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/ush/python_utils/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
from ush.python_utils.misc import *

class TestMisc:
"""Test the misc.py functions."""

def test_uc(self):
"""Test the uppercase() function."""
assert uppercase('s') == 'S'

def test_lc(self):
"""Test the lowercase() function."""
assert lowercase('S') == 's'

def test_find_pattern_in_str(self):
"""Test the find_pattern_in_str() function."""
assert not find_pattern_in_str('.', 's')

def test_find_pattern_in_fike(self):
"""Test the find_pattern_in_file() function."""
f = open("test_misc.txt", "w")
f.write("Hello World from " + f.name)
f.close()
Expand Down

0 comments on commit 29089cd

Please sign in to comment.