From 053579f9ad9810bf88158784f6eb6093892f38de Mon Sep 17 00:00:00 2001 From: Shyue Ping Ong Date: Wed, 1 Dec 2021 09:19:33 -0800 Subject: [PATCH] Run black on test files. --- tests/test_json.py | 32 ++++++++++++++++++++++++++------ tests/test_serialization.py | 2 -- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/tests/test_json.py b/tests/test_json.py index 54812dce6..126e7939c 100644 --- a/tests/test_json.py +++ b/tests/test_json.py @@ -149,11 +149,20 @@ def test_unsafe_hash(self): b_dict = {"first": GMC(3, 3.0, "three"), "second": GMC(4, 4.0, "four")} c_list_dict_list = [ { - "list1": [GMC(5, 5.0, "five"), GMC(6, 6.0, "six"), GMC(7, 7.0, "seven"),], + "list1": [ + GMC(5, 5.0, "five"), + GMC(6, 6.0, "six"), + GMC(7, 7.0, "seven"), + ], "list2": [GMC(8, 8.0, "eight")], }, { - "list3": [GMC(9, 9.0, "nine"), GMC(10, 10.0, "ten"), GMC(11, 11.0, "eleven"), GMC(12, 12.0, "twelve"),], + "list3": [ + GMC(9, 9.0, "nine"), + GMC(10, 10.0, "ten"), + GMC(11, 11.0, "eleven"), + GMC(12, 12.0, "twelve"), + ], "list4": [GMC(13, 13.0, "thirteen"), GMC(14, 14.0, "fourteen")], "list5": [GMC(15, 15.0, "fifteen")], }, @@ -161,7 +170,8 @@ def test_unsafe_hash(self): obj = GoodNestedMSONClass(a_list=a_list, b_dict=b_dict, c_list_dict_list=c_list_dict_list) self.assertEqual( - a_list[0].unsafe_hash().hexdigest(), "ea44de0e2ef627be582282c02c48e94de0d58ec6", + a_list[0].unsafe_hash().hexdigest(), + "ea44de0e2ef627be582282c02c48e94de0d58ec6", ) self.assertEqual(obj.unsafe_hash().hexdigest(), "44204c8da394e878f7562c9aa2e37c2177f28b81") @@ -176,11 +186,20 @@ def test_nested_to_from_dict(self): b_dict = {"first": GMC(3, 3.0, "three"), "second": GMC(4, 4.0, "four")} c_list_dict_list = [ { - "list1": [GMC(5, 5.0, "five"), GMC(6, 6.0, "six"), GMC(7, 7.0, "seven"),], + "list1": [ + GMC(5, 5.0, "five"), + GMC(6, 6.0, "six"), + GMC(7, 7.0, "seven"), + ], "list2": [GMC(8, 8.0, "eight")], }, { - "list3": [GMC(9, 9.0, "nine"), GMC(10, 10.0, "ten"), GMC(11, 11.0, "eleven"), GMC(12, 12.0, "twelve"),], + "list3": [ + GMC(9, 9.0, "nine"), + GMC(10, 10.0, "ten"), + GMC(11, 11.0, "eleven"), + GMC(12, 12.0, "twelve"), + ], "list4": [GMC(13, 13.0, "thirteen"), GMC(14, 14.0, "fourteen")], "list5": [GMC(15, 15.0, "fifteen")], }, @@ -501,7 +520,8 @@ def test_redirect(self): def test_redirect_settings_file(self): data = _load_redirect(os.path.join(test_dir, "test_settings.yaml")) self.assertEqual( - data, {"old_module": {"old_class": {"@class": "new_class", "@module": "new_module"}}}, + data, + {"old_module": {"old_class": {"@class": "new_class", "@module": "new_module"}}}, ) def test_pydantic_integrations(self): diff --git a/tests/test_serialization.py b/tests/test_serialization.py index f5a69d5e2..cb2d1590a 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -66,8 +66,6 @@ def test_dumpfn_loadfn(self): with self.assertRaises(TypeError): loadfn("monte_test.txt", fmt="garbage") - - @unittest.skipIf(msgpack is None, "msgpack-python not installed.") def test_mpk(self): d = {"hello": "world"}