def test__rules__std_L003__get_element_template_info(): """Test _get_element_template_info with invalid templated_file parameter.""" mock_segment = Mock() mock_segment.return_value.is_type = True with pytest.raises(ValueError): Rule_L003._get_element_template_info(elem=mock_segment, templated_file=None)
def test__rules__std_L003_make_indent(indent_unit, num, tab_space_size, result): """Test Rule_L003._make_indent.""" res = Rule_L003._make_indent(num=num, indent_unit=indent_unit, tab_space_size=tab_space_size) assert res == result
def test__rules__std_L003_indent_size(tab_space_size, segments, result): """Test Rule_L003._make_indent.""" res = Rule_L003._indent_size(segments=segments, tab_space_size=tab_space_size) assert res == result
def test__rules__std_L003_make_indent_invalid_param(): """Test Rule_L003._make_indent with invalid indent_unit parameter.""" with pytest.raises(ValueError): Rule_L003._make_indent(indent_unit="aaa")