@@ -53,7 +53,7 @@ def __init__(self, testcase: Testcase) -> None:
5353self ._any_success :bool = False
5454self ._last_success :Optional [bool ]= None
5555self ._description :str = "Reduction"
56- self ._tried :Set [str ]= set ()
56+ self ._tried :Set [bytes ]= set ()
5757
5858@property
5959def last_feedback (self )-> bool :
@@ -65,7 +65,7 @@ def last_feedback(self) -> bool:
6565assert self ._last_success is not None ,"No feedback received yet"
6666return self ._last_success
6767
68- def update_tried (self ,tried :Iterable [str ])-> None :
68+ def update_tried (self ,tried :Iterable [bytes ])-> None :
6969"""Update the list of tried hashes. Testcases are hashed with SHA-512
7070 and digested to bytes (`hashlib.sha512(testcase).digest()`)
7171
@@ -74,7 +74,7 @@ def update_tried(self, tried: Iterable[str]) -> None:
7474 """
7575self ._tried .update (frozenset (tried ))
7676
77- def get_tried (self )-> FrozenSet [str ]:
77+ def get_tried (self )-> FrozenSet [bytes ]:
7878"""Return the set of tried testcase hashes. Testcases are hashed with SHA-512
7979 and digested to bytes (`hashlib.sha512(testcase).digest()`)
8080
@@ -117,7 +117,7 @@ def try_testcase(
117117for part in testcase .parts :
118118tc_hasher .update (part )
119119tc_hasher .update (testcase .after )
120- tc_hash = tc_hasher .hexdigest ()
120+ tc_hash = tc_hasher .digest ()
121121if tc_hash not in self ._tried :
122122self ._tried .add (tc_hash )
123123self ._last_success = None