@@ -481,7 +481,7 @@ def test_enforces_type(self):
481481 exc_args = ("Invalid value for hash. Must be True, False, or None." ,)
482482
483483 with pytest .raises (TypeError ) as e :
484- make_class ("C" , {}, hash = 1 ),
484+ make_class ("C" , {}, unsafe_hash = 1 ),
485485
486486 assert exc_args == e .value .args
487487
@@ -501,13 +501,18 @@ def test_enforce_no_cache_hash_without_hash(self):
501501 "enabled." ,
502502 )
503503 with pytest .raises (TypeError ) as e :
504- make_class ("C" , {}, hash = False , cache_hash = True )
504+ make_class ("C" , {}, unsafe_hash = False , cache_hash = True )
505505 assert exc_args == e .value .args
506506
507507 # unhashable case
508508 with pytest .raises (TypeError ) as e :
509509 make_class (
510- "C" , {}, hash = None , eq = True , frozen = False , cache_hash = True
510+ "C" ,
511+ {},
512+ unsafe_hash = None ,
513+ eq = True ,
514+ frozen = False ,
515+ cache_hash = True ,
511516 )
512517 assert exc_args == e .value .args
513518
@@ -521,7 +526,7 @@ def test_enforce_no_cached_hash_without_init(self):
521526 " init must be True." ,
522527 )
523528 with pytest .raises (TypeError ) as e :
524- make_class ("C" , {}, init = False , hash = True , cache_hash = True )
529+ make_class ("C" , {}, init = False , unsafe_hash = True , cache_hash = True )
525530 assert exc_args == e .value .args
526531
527532 @given (booleans (), booleans ())
@@ -533,7 +538,7 @@ def test_hash_attribute(self, slots, cache_hash):
533538 "C" ,
534539 {"a" : attr .ib (hash = False ), "b" : attr .ib ()},
535540 slots = slots ,
536- hash = True ,
541+ unsafe_hash = True ,
537542 cache_hash = cache_hash ,
538543 )
539544
@@ -629,13 +634,13 @@ def __hash__(self):
629634 Uncached = make_class (
630635 "Uncached" ,
631636 {"hash_counter" : attr .ib (factory = HashCounter )},
632- hash = True ,
637+ unsafe_hash = True ,
633638 cache_hash = False ,
634639 )
635640 Cached = make_class (
636641 "Cached" ,
637642 {"hash_counter" : attr .ib (factory = HashCounter )},
638- hash = True ,
643+ unsafe_hash = True ,
639644 cache_hash = True ,
640645 )
641646
0 commit comments