2222
2323
2424class TestGetHasherFactory :
25-
2625 def test_get_guaranteed (self ):
2726 algorithm_and_hasher_factory = [
2827 ("md5" , hashlib .md5 ),
@@ -59,14 +58,12 @@ def test_not_available(self):
5958 _get_hasher_factory ("not available" )
6059
6160 def test_bypass_hasher_factory (self ):
62-
6361 # test standard hasher
6462 hasher_factory = _get_hasher_factory (hashlib .sha256 )
6563 assert hasher_factory is hashlib .sha256
6664
6765 # test raise on custom hasher with bad interface
6866 class IncompleteMockHasher :
69-
7067 def __init__ (self , * args , ** kwargs ):
7168 pass
7269
@@ -78,7 +75,6 @@ def update(self, *args, **kwargs):
7875
7976 # test custom hasher with ok interface
8077 class MockHasher (IncompleteMockHasher ):
81-
8278 def hexdigest (self ):
8379 return ""
8480
@@ -87,7 +83,6 @@ def hexdigest(self):
8783
8884
8985class TestGetMatchPatterns :
90-
9186 def test_default_match_all (self ):
9287 ms = get_match_patterns ()
9388 assert ms == ["*" ]
@@ -139,7 +134,6 @@ def test_ignore_extensions(self):
139134
140135
141136class TempDirTest :
142-
143137 def setup_method (self ):
144138 self .dir = tempfile .mkdtemp ()
145139
@@ -441,7 +435,6 @@ def dirhash_mp_comp(*args, **kwargs):
441435
442436
443437class TestDirhash (TempDirTest ):
444-
445438 def test_guaranteed_algorithms (self ):
446439 self .mkdirs ("root/d1/d11" )
447440 self .mkdirs ("root/d2" )
@@ -545,7 +538,6 @@ def test_symlinked_dir(self):
545538 assert root1_linked_dirs_true == root2
546539
547540 def test_cache_used_for_symlinks (self ):
548-
549541 self .mkdirs ("root/dir" )
550542 self .mkfile ("root/file" , "< one chunk content" )
551543 for i in range (10 ):
@@ -667,7 +659,6 @@ def test_raise_on_not_at_least_one_of_name_and_data(self):
667659 )
668660
669661 def test_multiproc_speedup (self ):
670-
671662 self .mkdirs ("root/dir" )
672663 num_files = 10
673664 for i in range (num_files ):
@@ -809,7 +800,6 @@ def hexdigest(self):
809800
810801
811802class IdentityHasher :
812-
813803 def __init__ (self , initial_data = b"" ):
814804 self .datas = [initial_data .decode ("utf-8" )]
815805
@@ -821,7 +811,6 @@ def hexdigest(self):
821811
822812
823813class TestProtocol :
824-
825814 def test_raise_for_invalid_entry_properties (self ):
826815 with pytest .raises (ValueError ):
827816 Protocol (entry_properties = ["not-valid" ])
0 commit comments