@@ -11,7 +11,7 @@ fn test_to_py_object_numeric() {
1111 false ,
1212 )
1313 . unwrap ( ) ;
14- Python :: with_gil ( |py| {
14+ Python :: attach ( |py| {
1515 let python_value = value. into_pyobject ( py) . unwrap ( ) ;
1616 let string = python_value. to_string ( ) ;
1717 assert_eq ! (
@@ -28,7 +28,7 @@ fn test_to_py_object_other() {
2828 true ,
2929 )
3030 . unwrap ( ) ;
31- Python :: with_gil ( |py| {
31+ Python :: attach ( |py| {
3232 let python_value = value. into_pyobject ( py) . unwrap ( ) ;
3333 let string = python_value. to_string ( ) ;
3434 assert_eq ! ( string, "['string', '£', True, False, None, nan, inf, -inf]" ) ;
@@ -37,7 +37,7 @@ fn test_to_py_object_other() {
3737
3838#[ test]
3939fn test_cache_into ( ) {
40- Python :: with_gil ( |py| {
40+ Python :: attach ( |py| {
4141 let c: StringCacheMode = true . into_pyobject ( py) . unwrap ( ) . extract ( ) . unwrap ( ) ;
4242 assert ! ( matches!( c, StringCacheMode :: All ) ) ;
4343
@@ -73,15 +73,15 @@ fn test_cache_into() {
7373#[ test]
7474fn test_pystring_ascii_new ( ) {
7575 let json = "100abc" ;
76- Python :: with_gil ( |py| {
76+ Python :: attach ( |py| {
7777 let s = unsafe { pystring_ascii_new ( py, json) } ;
7878 assert_eq ! ( s. to_string( ) , "100abc" ) ;
7979 } ) ;
8080}
8181
8282#[ test]
8383fn test_python_parse_default ( ) {
84- Python :: with_gil ( |py| {
84+ Python :: attach ( |py| {
8585 let v = PythonParse :: default ( ) . python_parse ( py, b"[123]" ) . unwrap ( ) ;
8686 assert_eq ! ( v. to_string( ) , "[123]" ) ;
8787 } ) ;
0 commit comments