From 0cc8fd5fb2a026662dc2bd12f6bad9f68e5da5b0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 13 Apr 2022 10:01:57 +0300 Subject: Update Exception name Change the exception name to be more descriptive. --- tests/qc/test_cells.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/qc') diff --git a/tests/qc/test_cells.py b/tests/qc/test_cells.py index b105286..5e25a9a 100644 --- a/tests/qc/test_cells.py +++ b/tests/qc/test_cells.py @@ -4,20 +4,20 @@ import pytest from hypothesis import given from hypothesis import strategies as st -from quality_control.errors import InvalidValue +from quality_control.errors import InvalidCellValue from quality_control.average import valid_value as avg_valid_value from quality_control.standard_error import valid_value as se_valid_value @given(num_str=st.from_regex("^(?!([0-9]+\.([0-9]{3}|[0-9]{6,}))).*", fullmatch=True)) def test_cell_value_errors_with_invalid_inputs(num_str): - with pytest.raises(InvalidValue): + with pytest.raises(InvalidCellValue): avg_valid_value(num_str) - with pytest.raises(InvalidValue): + with pytest.raises(InvalidCellValue): se_valid_value(num_str) @given(num_str=st.from_regex("^[0-9]+\.([0-9]{1,2}|[0-9]{4,}$)", fullmatch=True)) def test_cell_average_value_errors_if_not_three_decimal_places(num_str): - with pytest.raises(InvalidValue): + with pytest.raises(InvalidCellValue): avg_valid_value(num_str) @given(num_str=st.from_regex("^[0-9]+\.[0-9]{3}$", fullmatch=True)) @@ -29,7 +29,7 @@ def test_cell_average_value_pass_if_three_decimal_places(num_str): @given(num_str=st.from_regex("^[0-9]+\.([0-9]{0,5}$)", fullmatch=True)) def test_cell_standard_error_value_errors_if_less_than_six_decimal_places(num_str): - with pytest.raises(InvalidValue): + with pytest.raises(InvalidCellValue): se_valid_value(num_str) @given(num_str=st.from_regex("^[0-9]+\.[0-9]{6,}$", fullmatch=True)) -- cgit v1.2.3