diff options
author | Anthon van der Neut <anthon@mnt.org> | 2019-07-25 23:29:34 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2019-07-25 23:29:34 +0200 |
commit | 7d50ad630dc3c4efff391008f3cd3cdd250cbacd (patch) | |
tree | 278e918166fc42fcf2dad4e5d639eb539e1598e6 /_test | |
parent | 83b2bbba61d2ada9911dc1d07a121b141c6857ef (diff) | |
download | ruamel.yaml-7d50ad630dc3c4efff391008f3cd3cdd250cbacd.tar.gz |
split off C library into separate package0.16.0
Diffstat (limited to '_test')
-rw-r--r-- | _test/test_api_change.py | 4 | ||||
-rw-r--r-- | _test/test_cyaml.py | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/_test/test_api_change.py b/_test/test_api_change.py index 3f3d411..b47a551 100644 --- a/_test/test_api_change.py +++ b/_test/test_api_change.py @@ -232,7 +232,7 @@ class TestOldAPI: def test_duplicate_keys_02(self): # Issue 165 unicode keys in error/warning from ruamel.yaml import safe_load - from ruamel.yaml.constructor import DuplicateKeyFutureWarning + from ruamel.yaml.constructor import DuplicateKeyError - with pytest.warns(DuplicateKeyFutureWarning): + with pytest.raises(DuplicateKeyError): safe_load('type: Doméstica\ntype: International') diff --git a/_test/test_cyaml.py b/_test/test_cyaml.py index 1d4c356..6b618f3 100644 --- a/_test/test_cyaml.py +++ b/_test/test_cyaml.py @@ -7,9 +7,11 @@ from textwrap import dedent @pytest.mark.skipif( - platform.python_implementation() == 'Jython', reason='Jython throws RepresenterError' + platform.python_implementation() in ['Jython', 'PyPy'], + reason='Jython throws RepresenterError' ) def test_load_cyaml(): + print("???????????????????????", platform.python_implementation()) import ruamel.yaml if sys.version_info >= (3, 8): @@ -20,7 +22,9 @@ def test_load_cyaml(): ruamel.yaml.load('abc: 1', Loader=CLoader) -@pytest.mark.skipif(sys.version_info >= (3, 8), reason='no _PyGC_FINALIZED') +@pytest.mark.skipif(sys.version_info >= (3, 8) + or platform.python_implementation() in ['Jython', 'PyPy'], + reason='no _PyGC_FINALIZED') def test_dump_cyaml(): import ruamel.yaml @@ -36,6 +40,9 @@ def test_dump_cyaml(): assert res == 'a: 1\nb: 2\n' +@pytest.mark.skipif( + platform.python_implementation() in ['Jython', 'PyPy'], reason='not avialable' +) def test_load_cyaml_1_2(): # issue 155 import ruamel.yaml @@ -52,6 +59,9 @@ def test_load_cyaml_1_2(): yaml.load(inp) +@pytest.mark.skipif( + platform.python_implementation() in ['Jython', 'PyPy'], reason='not available' +) def test_dump_cyaml_1_2(): # issue 155 import ruamel.yaml |