FilecomparisonTests   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_Hasher_provides_unique_hashes() 0 7 1
1
import unittest
2
from mock import Mock
3
import os.path as ospath
4
5
class FilecomparisonTests(unittest.TestCase):
6
7
8
    def test_Hasher_provides_unique_hashes(self):
9
        import niprov.hashing
10
        hasher = niprov.hashing.Hasher()
11
        file1 = __file__
12
        file2 = niprov.hashing.__file__
13
        self.assertEqual(hasher.digest(file1), hasher.digest(file1))
14
        self.assertNotEqual(hasher.digest(file1), hasher.digest(file2))
15