diff options
author | Anthon van der Neut <anthon@mnt.org> | 2021-03-09 09:02:50 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2021-03-09 09:02:50 +0100 |
commit | e73562c6f14d1d71a9fea174d58465e1b13f68af (patch) | |
tree | 309851cca7d411b31c27753555871d493282c7f0 /_test/test_json_numbers.py | |
parent | 96839d9f64f4698bdc519cbfbd48d51178460714 (diff) | |
download | ruamel.yaml-e73562c6f14d1d71a9fea174d58465e1b13f68af.tar.gz |
remove python 2 specific code
add future deprecation warning to old style functions
Diffstat (limited to '_test/test_json_numbers.py')
-rw-r--r-- | _test/test_json_numbers.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/_test/test_json_numbers.py b/_test/test_json_numbers.py index 56b7b6f..d89453c 100644 --- a/_test/test_json_numbers.py +++ b/_test/test_json_numbers.py @@ -1,7 +1,5 @@ # coding: utf-8 -from __future__ import print_function - import pytest # NOQA import json @@ -10,12 +8,13 @@ import json def load(s, typ=float): import ruamel.yaml + yaml = ruamel.yaml.YAML() x = '{"low": %s }' % (s) print('input: [%s]' % (s), repr(x)) # just to check it is loadable json res = json.loads(x) assert isinstance(res['low'], typ) - ret_val = ruamel.yaml.load(x, ruamel.yaml.RoundTripLoader) + ret_val = yaml.load(x) print(ret_val) return ret_val['low'] |