From 37ede8ed5b07612573a0a6c720630fd31a5b398f Mon Sep 17 00:00:00 2001 From: Nariman Safiulin Date: Tue, 27 Feb 2024 09:28:27 +0200 Subject: [PATCH] tests: fix `test_cyrillic` test for python 2 --- tests/integration_test.rs | 7 +++++++ tests/scripts/cyrillic.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration_test.rs b/tests/integration_test.rs index ef067456..e136e35c 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -237,6 +237,13 @@ fn test_cyrillic() { return; } } + + // Identifiers with characters outside the ASCII range are supported from Python 3 + let runner = TestRunner::new(Config::default(), "./tests/scripts/longsleep.py"); + if runner.spy.version.major == 2 { + return; + } + let mut runner = TestRunner::new(Config::default(), "./tests/scripts/cyrillic.py"); let traces = runner.spy.get_stack_traces().unwrap(); diff --git a/tests/scripts/cyrillic.py b/tests/scripts/cyrillic.py index 995c032c..77370c22 100644 --- a/tests/scripts/cyrillic.py +++ b/tests/scripts/cyrillic.py @@ -4,4 +4,4 @@ def кириллица(seconds): time.sleep(seconds) if __name__ == "__main__": - кириллица(10) + кириллица(100)