diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-08-03 22:14:57 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-08-03 22:14:57 +0200 |
commit | dce10fcff1de54121fb8b440b883ef5d3fe2f96a (patch) | |
tree | 072b4bd247e6f1cd95c08c7b67fea0fc96f0578e /_test/lib/test_representer.py | |
parent | 2966a4f215861fa05e0dc7e0cd53350766e794c6 (diff) | |
download | ruamel.yaml-dce10fcff1de54121fb8b440b883ef5d3fe2f96a.tar.gz |
Apply oitnb and mypy 0.620, then make everything work again0.15.48
Diffstat (limited to '_test/lib/test_representer.py')
-rw-r--r-- | _test/lib/test_representer.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/_test/lib/test_representer.py b/_test/lib/test_representer.py index 2c7e2c8..a83d2b2 100644 --- a/_test/lib/test_representer.py +++ b/_test/lib/test_representer.py @@ -14,8 +14,12 @@ def test_representer_types(code_filename, verbose=False): native1 = test_constructor._load_code(fp0.read()) native2 = None try: - output = yaml.dump(native1, Dumper=test_constructor.MyDumper, - allow_unicode=allow_unicode, encoding=encoding) + output = yaml.dump( + native1, + Dumper=test_constructor.MyDumper, + allow_unicode=allow_unicode, + encoding=encoding, + ) native2 = yaml.load(output, Loader=test_constructor.MyLoader) try: if native1 == native2: @@ -25,18 +29,18 @@ def test_representer_types(code_filename, verbose=False): value1 = test_constructor._serialize_value(native1) value2 = test_constructor._serialize_value(native2) if verbose: - print("SERIALIZED NATIVE1:") + print('SERIALIZED NATIVE1:') print(value1) - print("SERIALIZED NATIVE2:") + print('SERIALIZED NATIVE2:') print(value2) assert value1 == value2, (native1, native2) finally: if verbose: - print("NATIVE1:") + print('NATIVE1:') pprint.pprint(native1) - print("NATIVE2:") + print('NATIVE2:') pprint.pprint(native2) - print("OUTPUT:") + print('OUTPUT:') print(output) @@ -44,4 +48,5 @@ test_representer_types.unittest = ['.code'] if __name__ == '__main__': import test_appliance + test_appliance.run(globals()) |