Code Duplication    Length = 20-20 lines in 2 locations

tests/test_main.py 2 locations

@@ 125-144 (lines=20) @@
122
                test_passed = False
123
        self.assertTrue(test_passed)
124
125
    @unittest.skipUnless(check_orca(), "Test not needed if orca executable is missing")
126
    def test_export_only(self):
127
        """Test to show that only export option works"""
128
        arguments = Namespace(
129
            files=['./ExamplePhotos/32-lens_data.jpeg'],
130
            loglevel=30,
131
            alphabetic=False,
132
            no_open=True,
133
            export_only=True,
134
            test=True,
135
            export="png",
136
            output="metastalk_exports")
137
        metastalk = main.MetaStalk()
138
        metastalk.run(arguments)
139
        test_passed = True
140
        for required_file in self.filenames:
141
            if not os.path.isfile(f"metastalk_exports/{required_file}.png"):
142
                print(f"missing file {required_file}")
143
                test_passed = False
144
        self.assertTrue(test_passed)
145
@@ 104-123 (lines=20) @@
101
                test_passed = False
102
        self.assertTrue(test_passed)
103
104
    @unittest.skipUnless(check_orca(), "Test not needed if orca executable is missing")
105
    def test_orca_export(self):
106
        """Test for export fail."""
107
        test_passed = True
108
        arguments = Namespace(
109
            files=['./ExamplePhotos/'],
110
            loglevel=30,
111
            test=True,
112
            alphabetic=False,
113
            export_only=False,
114
            no_open=True,
115
            export="pdf",
116
            output="metastalk_exports")
117
        metastalk = main.MetaStalk()
118
        metastalk.run(arguments)
119
        for required_file in self.filenames:
120
            if not os.path.isfile(f"metastalk_exports/{required_file}.pdf"):
121
                print(f"missing file {required_file}")
122
                test_passed = False
123
        self.assertTrue(test_passed)
124
125
    @unittest.skipUnless(check_orca(), "Test not needed if orca executable is missing")
126
    def test_export_only(self):