diff options
Diffstat (limited to '_test/test_api_change.py')
-rw-r--r-- | _test/test_api_change.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/_test/test_api_change.py b/_test/test_api_change.py index b47a551..4ce61b6 100644 --- a/_test/test_api_change.py +++ b/_test/test_api_change.py @@ -1,7 +1,5 @@ # coding: utf-8 -from __future__ import print_function - """ testing of anchors and the aliases referring to them """ @@ -158,7 +156,7 @@ class TestLoadAll: fn = Path(str(tmpdir)) / 'test.yaml' fn.write_text( - textwrap.dedent(u"""\ + textwrap.dedent("""\ --- - a --- @@ -196,10 +194,10 @@ class TestDumpLoadUnicode: from ruamel.yaml import YAML yaml = YAML() - text_dict = {'text': u'HELLO_WORLD©'} + text_dict = {'text': 'HELLO_WORLD©'} file_name = str(tmpdir) + '/tstFile.yaml' yaml.dump(text_dict, open(file_name, 'w')) - assert open(file_name, 'rb').read().decode('utf-8') == u'text: HELLO_WORLD©\n' + assert open(file_name, 'rb').read().decode('utf-8') == 'text: HELLO_WORLD©\n' def test_read_unicode(self, tmpdir): from ruamel.yaml import YAML @@ -207,9 +205,9 @@ class TestDumpLoadUnicode: yaml = YAML() file_name = str(tmpdir) + '/tstFile.yaml' with open(file_name, 'wb') as fp: - fp.write(u'text: HELLO_WORLD©\n'.encode('utf-8')) + fp.write('text: HELLO_WORLD©\n'.encode('utf-8')) text_dict = yaml.load(open(file_name, 'r')) - assert text_dict['text'] == u'HELLO_WORLD©' + assert text_dict['text'] == 'HELLO_WORLD©' class TestFlowStyle: |