Code Duplication    Length = 9-10 lines in 2 locations

acceptance/test_contextAPI.py 1 location

@@ 130-139 (lines=10) @@
127
        self.assertEqual(2, img.versions[-1]['a'])
128
        self.assertEqual(1, img.versions[-2]['a'])
129
130
    def test_If_no_parent_provided_found_copy_considered_parent(self):
131
        self.provenance.add('testdata/eeg/stub.cnt')
132
        self.touch('temp/orig.f')
133
        self.provenance.log('temp/orig.f', 'op1', 'testdata/eeg/stub.cnt')
134
        shutil.copy('temp/orig.f', 'temp/copy.f')
135
        self.touch('temp/child.f')
136
        child = self.provenance.log('temp/child.f', 'op2', 'temp/copy.f')
137
        self.assertEqual(child.provenance['subject'], 'Jane Doe')
138
        copy = self.provenance.get().byLocation('temp/copy.f')
139
        self.assertIn('temp/orig.f', copy.provenance['parents'][0])
140
141
    def test_Differentiates_Fifs(self):
142
        """

acceptance/test_api.py 1 location

@@ 33-41 (lines=9) @@
30
        provenance = niprov.ProvenanceContext().get().byLocation(pth)
31
        niprov.print_(provenance)
32
33
    def test_Log(self):
34
        import niprov
35
        niprov.discover('testdata')
36
        newfile = os.path.abspath('temp/smoothed.test')
37
        self.touch(newfile)
38
        niprov.log(newfile, 'test', os.path.abspath('testdata/eeg/stub.cnt'))
39
        img = niprov.ProvenanceContext().get().byLocation(newfile)
40
        self.assertEqual(img.provenance['subject'], 'Jane Doe')
41
        self.assertEqual(img.provenance['size'], os.path.getsize(newfile))
42
43
    def test_Narrative_file(self):
44
        import niprov