Commit 43259b8 1 parent 3a754c8 commit 43259b8 Copy full SHA for 43259b8
File tree 2 files changed +23
-10
lines changed
2 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,27 @@ fn test_unicode() {
229
229
assert ! ( !traces[ 0 ] . owns_gil) ;
230
230
}
231
231
232
+ #[ test]
233
+ fn test_cyrillic ( ) {
234
+ #[ cfg( target_os = "macos" ) ]
235
+ {
236
+ if unsafe { libc:: geteuid ( ) } != 0 {
237
+ return ;
238
+ }
239
+ }
240
+ let mut runner = TestRunner :: new ( Config :: default ( ) , "./tests/scripts/cyrillic.py" ) ;
241
+
242
+ let traces = runner. spy . get_stack_traces ( ) . unwrap ( ) ;
243
+ assert_eq ! ( traces. len( ) , 1 ) ;
244
+ let trace = & traces[ 0 ] ;
245
+
246
+ assert_eq ! ( trace. frames[ 0 ] . name, "кириллица" ) ;
247
+ assert_eq ! ( trace. frames[ 0 ] . line, 4 ) ;
248
+
249
+ assert_eq ! ( trace. frames[ 1 ] . name, "<module>" ) ;
250
+ assert_eq ! ( trace. frames[ 1 ] . line, 7 ) ;
251
+ }
252
+
232
253
#[ test]
233
254
fn test_local_vars ( ) {
234
255
#[ cfg( target_os = "macos" ) ]
Original file line number Diff line number Diff line change 1
1
import time
2
2
3
-
4
- def f (seconds ):
5
- time .sleep (seconds )
6
-
7
-
8
3
def кириллица (seconds ):
9
- f (seconds )
10
-
4
+ time .sleep (seconds )
11
5
12
6
if __name__ == "__main__" :
13
- f (3 )
14
- кириллица (3 )
15
- f (3 )
7
+ кириллица (10 )
You can’t perform that action at this time.
0 commit comments