Skip to content

Commit

Permalink
coverage back to 100 percent
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew McCluskey committed Feb 28, 2020
1 parent efcfacc commit d86760d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions uravu/tests/test_relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,28 @@ def test_init_different_length_y_and_y_err_two_dimension(self):
test_y_e = np.linspace(0, 199, 99)
Relationship(utils.straight_line, test_x, test_y, test_y_e)

def test_init_different_variables_and_names(self):
"""
Test initialisation with different length variable_names and
variables
"""
with self.assertRaises(ValueError):
test_x = np.linspace(0, 99, 100)
test_y = np.linspace(0, 199, 100)
test_y_e = np.linspace(0, 199, 99)
Relationship(utils.straight_line, test_x, test_y, test_y_e, variable_names=['a'])

def test_init_different_variables_and_units(self):
"""
Test initialisation with different length variable_units and
variables
"""
with self.assertRaises(ValueError):
test_x = np.linspace(0, 99, 100)
test_y = np.linspace(0, 199, 100)
test_y_e = np.linspace(0, 199, 99)
Relationship(utils.straight_line, test_x, test_y, test_y_e, variable_names=[UREG.meter])

def test_init_x_u_one_dimensional(self):
"""
Test the initialisation of the relationship class with one
Expand Down

0 comments on commit d86760d

Please sign in to comment.