From 7416164aca89b09bcee9d27442c4763d9245e232 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 15 Jun 2017 13:23:13 +0200 Subject: [PATCH] Rename old validate tests --- tests/unit/config/test_configtypes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index a44556a72..b5637b77f 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -492,7 +492,7 @@ class TestList: klass(none_ok_inner=True).from_py(None) @pytest.mark.parametrize('val', [None, ['foo', 'bar']]) - def test_validate_length(self, klass, val): + def test_from_py_length(self, klass, val): klass(none_ok_outer=True, length=2).from_py(val) @pytest.mark.parametrize('val', [['a'], ['a', 'b'], ['a', 'b', 'c', 'd']]) @@ -661,7 +661,7 @@ class TestNumeric: ({'minval': 2, 'maxval': 3}, 1, False), ({'minval': 2, 'maxval': 3}, 4, False), ]) - def test_validate_invalid(self, klass, kwargs, val, valid): + def test_validate_bounds_invalid(self, klass, kwargs, val, valid): if valid: klass(**kwargs)._validate_bounds(val) else: @@ -1055,7 +1055,7 @@ class TestFont: assert klass().from_py(val) == expected def test_qtfont_float(self, qtfont_class): - """Test QtFont's transform with a float as point size. + """Test QtFont's from_py with a float as point size. We can't test the point size for equality as Qt seems to do some rounding as appropriate. @@ -1518,7 +1518,7 @@ class TestPadding: {'top': -1, 'bottom': 2, 'left': 3, 'right': 4}, {'top': 0.1, 'bottom': 2, 'left': 3, 'right': 4}, ]) - def test_validate_invalid(self, klass, val): + def test_from_py_invalid(self, klass, val): with pytest.raises(configexc.ValidationError): klass().from_py(val) @@ -1533,7 +1533,7 @@ class TestEncoding: def test_from_py(self, klass, val): assert klass().from_py(val) == val - def test_validate_invalid(self, klass): + def test_from_py_invalid(self, klass): with pytest.raises(configexc.ValidationError): klass().from_py('blubber')