diff options
Diffstat (limited to 'dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch')
-rw-r--r-- | dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch b/dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch deleted file mode 100644 index 49576b4f43e7..000000000000 --- a/dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/tests/test_validate.py b/tests/test_validate.py -index bffb0dc..c7d57d3 100644 ---- a/tests/test_validate.py -+++ b/tests/test_validate.py -@@ -2,7 +2,7 @@ - - from configobj import ConfigObj - import pytest --from validate import Validator, VdtValueTooSmallError -+from validate import Validator, VdtValueTooSmallError, dottedQuadToNum - - - class TestBasic(object): -@@ -161,3 +161,26 @@ class TestBasic(object): - 'test3': 3, - 'test4': 6.0 - }}} -+ -+ -+class TestDottedQuadToNum(object): -+ -+ def test_stripped(self): -+ assert dottedQuadToNum('192.0.2.0') == 3221225984 -+ assert dottedQuadToNum('192.0.2.1 ') == 3221225985 -+ assert dottedQuadToNum(' 192.0.2.2') == 3221225986 -+ assert dottedQuadToNum('\t\t192.0.2.3\n') == 3221225987 -+ with pytest.raises(ValueError) as excinfo: -+ dottedQuadToNum('192. 0. 2. 4') -+ assert str(excinfo.value) == 'Not a good dotted-quad IP: 192. 0. 2. 4' -+ -+ def test_boundaries(self): -+ assert dottedQuadToNum('0.0.0.0') == 0 -+ assert dottedQuadToNum('255.255.255.255') == 4294967295 -+ with pytest.raises(ValueError) as excinfo: -+ dottedQuadToNum('255.255.255.256') -+ assert str(excinfo.value) == ( -+ 'Not a good dotted-quad IP: 255.255.255.256') -+ with pytest.raises(ValueError) as excinfo: -+ dottedQuadToNum('-1') -+ assert str(excinfo.value) == 'Not a good dotted-quad IP: -1' |