Code Duplication    Length = 6-9 lines in 2 locations

tests/dicts.py 1 location

@@ 184-192 (lines=9) @@
181
182
        TT.merge(dic, self.upd, ac_merge=TT.MS_DICTS)
183
        self.assertTrue(dicts_equal(dic, exp))
184
185
    def test_40_update_with_merge_lists(self):
186
        dic = copy.deepcopy(self.dic)
187
        exp = copy.deepcopy(self.upd)
188
        exp["b"]["b"] = [0] + exp["b"]["b"]
189
        exp["b"]["c"] = dic["b"]["c"]
190
        exp["name"] = dic["name"]
191
192
        TT.merge(dic, self.upd, ac_merge=TT.MS_DICTS_AND_LISTS)
193
        self.assertTrue(dicts_equal(dic, exp))
194
195
    def test_50_update_with_custom_merge(self):

tests/api.py 1 location

@@ 397-402 (lines=6) @@
394
        self.assertEqual(cnf_2["a"], CNF_0["a"])
395
        self.assertEqual(cnf_2["b"]["b"], CNF_0["b"]["b"])
396
        self.assertEqual(cnf_2["b"]["c"], CNF_0["b"]["c"])
397
398
    def test_20_single_load_w_query(self):
399
        cpath = os.path.join(self.workdir, "cnf.json")
400
        TT.dump(CNF_0, cpath)
401
402
        try:
403
            if TT.query.jmespath:
404
                self.assertEqual(TT.single_load(cpath, ac_query="a"), 1)
405
                self.assertEqual(TT.single_load(cpath, ac_query="b.b"), [1, 2])