File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -462,8 +462,6 @@ def test_blocksize_name(self):
462462 self .check_blocksize_name ('sha384' , 128 , 48 )
463463 self .check_blocksize_name ('sha512' , 128 , 64 )
464464
465- # TODO: RUSTPYTHON
466- @unittest .expectedFailure
467465 @requires_sha3
468466 def test_blocksize_name_sha3 (self ):
469467 self .check_blocksize_name ('sha3_224' , 144 , 28 )
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ pub mod _hashlib {
183183 }
184184 }
185185
186- #[ pyclass( flags( IMMUTABLETYPE ) ) ]
186+ #[ pyclass( with ( Representable ) , flags( IMMUTABLETYPE ) ) ]
187187 impl PyHasherXof {
188188 fn new ( name : & str , d : HashXofWrapper ) -> Self {
189189 Self {
@@ -233,6 +233,15 @@ pub mod _hashlib {
233233 }
234234 }
235235
236+ impl Representable for PyHasherXof {
237+ fn repr_str ( zelf : & Py < Self > , _vm : & VirtualMachine ) -> PyResult < String > {
238+ Ok ( format ! (
239+ "<{} _hashlib.HASHXOF object @ {:#x}>" ,
240+ zelf. name, zelf as * const _ as usize
241+ ) )
242+ }
243+ }
244+
236245 #[ pyfunction( name = "new" ) ]
237246 fn hashlib_new ( args : NewHashArgs , vm : & VirtualMachine ) -> PyResult < PyObjectRef > {
238247 match args. name . as_str ( ) . to_lowercase ( ) . as_str ( ) {
You can’t perform that action at this time.
0 commit comments