Code Duplication    Length = 7-9 lines in 2 locations

acceptance/test_api.py 2 locations

@@ 32-40 (lines=9) @@
29
        niprov.print_()
30
        niprov.print_(forFile=os.path.abspath('testdata/dicom/T1.dcm'))
31
32
    def test_Log(self):
33
        import niprov
34
        niprov.discover('testdata')
35
        newfile = os.path.abspath('temp/smoothed.test')
36
        self.touch(newfile)
37
        niprov.log(newfile, 'test', os.path.abspath('testdata/eeg/stub.cnt'))
38
        img = niprov.get(forFile=newfile)
39
        self.assertEqual(img.provenance['subject'], 'Jane Doe')
40
        self.assertEqual(img.provenance['size'], os.path.getsize(newfile))
41
42
    def test_Narrative_file(self):
43
        import niprov
@@ 18-24 (lines=7) @@
15
            shutil.move(self.dbpath, self.dbpath.replace('.json','.test.json'))
16
        shutil.rmtree('temp')
17
18
    def test_Discover(self):
19
        import niprov
20
        niprov.discover('testdata')
21
        img = niprov.get(forFile=os.path.abspath('testdata/dicom/T1.dcm'))
22
        self.assertEqual(img.provenance['dimensions'], [80, 80, 10])
23
        img = niprov.get(forFile=os.path.abspath('testdata/eeg/stub.cnt'))
24
        self.assertEqual(img.provenance['subject'], 'Jane Doe')
25
26
    def test_Export_terminal(self):
27
        import niprov