Code Duplication    Length = 10-11 lines in 2 locations

tests/cli.py 2 locations

@@ 185-195 (lines=11) @@
182
        self.assertEqual(x["a"], 10)
183
        self.assertEqual(x["d"], [3, 4])
184
185
    def test_70_no_template(self):
186
        a = dict(name="a", a=1, b=dict(b=[1, 2], c="C"))
187
188
        infile = os.path.join(self.workdir, "a.json")
189
        output = os.path.join(self.workdir, "b.json")
190
191
        anyconfig.api.dump(a, infile)
192
        self.assertTrue(os.path.exists(infile))
193
194
        TT.main(["dummy", "--silent", "-o", output, infile])
195
        self.assertTrue(os.path.exists(output))
196
197
198
class Test_40_multi_inputs(Test_20_Base):
@@ 151-160 (lines=10) @@
148
    def test_52_wo_schema(self):
149
        self.run_and_check_exit_code(["--validate", CNF_0_PATH], 1)
150
151
    def test_54_gen_schema_and_validate_with_it(self):
152
        cnf = dict(name="a", a=1, b=dict(b=[1, 2], c="C"))
153
        infile = os.path.join(self.workdir, "cnf.json")
154
        output = os.path.join(self.workdir, "out.yaml")
155
        anyconfig.api.dump(cnf, infile)
156
157
        self.run_and_check_exit_code(["--gen-schema", "-o", output, infile], 0)
158
        self.assertTrue(os.path.exists(output))
159
        self.run_and_check_exit_code(["--schema", output, "--validate",
160
                                      infile], 0)
161
162
    def test_60_w_arg_option(self):
163
        a = dict(name="a", a=1, b=dict(b=[1, 2], c="C"), d=[1, 2])