Skip to content

Commit

Permalink
tests: add example class test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffjennings committed Jun 24, 2024
1 parent f24e644 commit c1fca5a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/test_example_module.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import numpy as np

from py_template.example_module import fibonacci
from py_template.example_module import fibonacci, SoftwareGroup

def test_fibonacci():
"""Check the Fibonacci sequence function"""
def test_example_function():
"""Check the Fibonacci sequence function returns correct result"""
fib = fibonacci(10)
np.testing.assert_allclose(actual=fib,
desired=[1, 1, 2, 3, 5, 8, 13, 21, 34, 55],
rtol=1e0,
)
)

def test_example_class():
"""Check the SoftwareGroup class can be instantiated and its class method called"""
sg = SoftwareGroup(people='us', purpose='fun')
sg.long_term_goals()

0 comments on commit c1fca5a

Please sign in to comment.