Commit 733a494e authored by rmapaah's avatar rmapaah

Issue #13: exit function replaced by raise value

parent 34b42bd5
......@@ -77,7 +77,8 @@ def pivot_calibration(matrices4x4):
s_values[i] = 0
if s_values[i] != 0:
rank += 1
if rank < 6:
if rank < 6: # pylint: disable=literal-comparison
raise ValueError("PivotCalibration: Failed. Rank < 6")
# Residual Matrix
......
......@@ -15,7 +15,7 @@ def test_empty_matrices4x4():
def test_rank_lt_six():
with pytest.raises(SystemExit):
with pytest.raises(ValueError):
file_names = glob('tests/data/PivotCalibration/1378476416922755200.txt')
arrays = [np.loadtxt(f) for f in file_names]
matrices = np.concatenate(arrays)
......@@ -56,7 +56,7 @@ def test_rank_if_condition():
# This test will be checking a specific if condition.
# But at the moment I dont know what data I need
# To get proper s_values to cover that if condition.
with pytest.raises(SystemExit):
with pytest.raises(ValueError):
file_names = glob('tests/data/test_case_data.txt')
arrays = [np.loadtxt(f) for f in file_names]
matrices = np.concatenate(arrays)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment