From 0664e38e5b61ab4170cab552d7789669fb10c3a0 Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:52:33 +0300 Subject: [PATCH] Set python args to be like CPython in CI (#8181) * Set python args to be like CPython in CI (ish) * Use `--slow-ci` * `--dont-add-python-opts` * unmark passing test --- .github/workflows/ci.yaml | 13 ++++++++++--- Lib/test/test_future_stmt/test_future.py | 1 - 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7ac163e83..3bcd44a5f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,6 +34,7 @@ env: CARGO_PROFILE_RELEASE_DEBUG: 0 CARGO_TERM_COLOR: always CI: true + FORCE_COLOR: 1 jobs: determine_changes: @@ -294,6 +295,8 @@ jobs: - os: macos-latest extra_test_args: - '-u all' + - '--timeout 600' + - '--dont-add-python-opts' env_polluting_tests: - test_set skips: [] @@ -301,6 +304,8 @@ jobs: - os: ubuntu-latest extra_test_args: - '-u all' + - '--timeout 600' + - '--dont-add-python-opts' env_polluting_tests: - test_set skips: [] @@ -308,6 +313,8 @@ jobs: - os: windows-2025 extra_test_args: - '-u all' + - '--timeout 600' + - '--dont-add-python-opts' env_polluting_tests: - test_set skips: [] @@ -360,7 +367,7 @@ jobs: - name: Run CPython tests run: | - target/release/rustpython -m test -j ${{ steps.cores.outputs.cores }} ${{ join(matrix.extra_test_args, ' ') }} --slowest --fail-env-changed --timeout 600 -v -x ${{ env.FLAKY_MP_TESTS }} ${{ join(matrix.skips, ' ') }} + target/release/rustpython -u -m test --slow-ci -j ${{ steps.cores.outputs.cores }} ${{ join(matrix.extra_test_args, ' ') }} -x ${{ env.FLAKY_MP_TESTS }} ${{ join(matrix.skips, ' ') }} timeout-minutes: ${{ matrix.timeout }} env: RUSTPYTHON_SKIP_ENV_POLLUTERS: true @@ -371,7 +378,7 @@ jobs: echo "::group::Attempt ${attempt}" set +e - target/release/rustpython -m test -j 1 ${{ join(matrix.extra_test_args, ' ') }} --slowest --fail-env-changed --timeout 600 -v ${{ env.FLAKY_MP_TESTS }} + target/release/rustpython -u -m test --slow-ci -j 1 ${{ join(matrix.extra_test_args, ' ') }} ${{ env.FLAKY_MP_TESTS }} status=$? set -e @@ -396,7 +403,7 @@ jobs: for thing in "${target_array[@]}"; do for i in $(seq 1 10); do set +e - target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v "${thing}" + target/release/rustpython -u -m test --slow-ci -u all -j 1 --timeout 600 --dont-add-python-opts "${thing}" exit_code=$? set -e if [ "${exit_code}" -eq 3 ]; then diff --git a/Lib/test/test_future_stmt/test_future.py b/Lib/test/test_future_stmt/test_future.py index 8d2050a39..02690919c 100644 --- a/Lib/test/test_future_stmt/test_future.py +++ b/Lib/test/test_future_stmt/test_future.py @@ -177,7 +177,6 @@ class FutureTest(unittest.TestCase): exec("from __future__ import unicode_literals; x = ''", {}, scope) self.assertIsInstance(scope["x"], str) - @unittest.expectedFailure # TODO: RUSTPYTHON; barry_as_FLUFL (<> operator) not supported def test_syntactical_future_repl(self): p = spawn_python('-i') p.stdin.write(b"from __future__ import barry_as_FLUFL\n")