diff options
author | Chayim I. Kirshen <c@kirshen.com> | 2023-05-15 18:12:03 +0300 |
---|---|---|
committer | Chayim I. Kirshen <c@kirshen.com> | 2023-05-15 18:12:03 +0300 |
commit | 01fdb580391b5f49e9f02298640c9af4f8d9db6b (patch) | |
tree | 2c718750ab77605169a1c8dd6da2ab0cbeefd36a | |
parent | e48032227242bc1d27b6159ffddd73d724770ab5 (diff) | |
download | redis-py-01fdb580391b5f49e9f02298640c9af4f8d9db6b.tar.gz |
splits
-rw-r--r-- | .github/workflows/version_coverage.yml | 49 | ||||
-rw-r--r-- | tests/test_command_parser.py | 2 | ||||
-rw-r--r-- | tests/test_commands.py | 5 |
3 files changed, 52 insertions, 4 deletions
diff --git a/.github/workflows/version_coverage.yml b/.github/workflows/version_coverage.yml index 154f677..d543fe6 100644 --- a/.github/workflows/version_coverage.yml +++ b/.github/workflows/version_coverage.yml @@ -19,7 +19,7 @@ permissions: jobs: - run-tests: + run-tests-pre-7: services: redis: image: redis:${{matrix.redis-version}} @@ -31,7 +31,7 @@ jobs: max-parallel: 15 fail-fast: false matrix: - redis-version: ['5.0', '6.0', '6.2', '7.0'] + redis-version: ['5.0', '6.0', '6.2'] python-version: ['3.7', '3.11'] redis-url: ["redis://localhost:6379"] resp: ["2"] @@ -65,4 +65,49 @@ jobs: pip install -U setuptools wheel pip install -r dev_requirements.txt pip install -r requirements.txt + pytest -m "not onlycluster and not redismod and not ssl and not replica" --redis-url=${{matrix.redis-url}} + + run-tests-7-plus: + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + max-parallel: 15 + fail-fast: false + matrix: + redis-version: ['7.0'] + python-version: ['3.7', '3.11'] + redis-url: ["redis://localhost:6379"] + resp: ["2"] + include: + - redis-version: 7.0 + redis-url: "redis://localhost:6379?protocol=3" + resp: "3" + python-version: '3.7' + - redis-version: 7.0 + redis-url: "redis://localhost:6379?protocol=3" + resp: "3" + python-version: '3.11' + - redis-version: 7.0 + python-version: '3.7' + - redis-version: 7.0 + python-version: '3.11' + + + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + name: redis ${{matrix.redis-version}} [resp ${{matrix.resp}}] [py ${{matrix.python-version}}] + + steps: + - run: | + docker run -p 6379:6379 -d redis:${{matrix.redis-version}} --enable-module-command yes --enable-debug-command yes + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: run tests + run: | + pip install -U setuptools wheel + pip install -r dev_requirements.txt + pip install -r requirements.txt pytest -m "not onlycluster and not redismod and not ssl and not replica" --redis-url=${{matrix.redis-url}}
\ No newline at end of file diff --git a/tests/test_command_parser.py b/tests/test_command_parser.py index 90c6fbf..5abc4a3 100644 --- a/tests/test_command_parser.py +++ b/tests/test_command_parser.py @@ -21,7 +21,7 @@ class TestCommandsParser: assert commands_parser.get_keys(r, *args3) == ["foo", "bar", "foobar"] @pytest.mark.filterwarnings("ignore:ResponseError") - @pytest.mark.skip_if_server_version_lt("6.0.0") + @skip_if_server_version_lt("6.0.0") @skip_if_redis_enterprise() def test_get_moveable_keys(self, r): commands_parser = CommandsParser(r) diff --git a/tests/test_commands.py b/tests/test_commands.py index b8e830a..5dda5ff 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -4039,7 +4039,10 @@ class TestRedisCommands: # trying to claim a message that isn't already pending doesn't # do anything response = r.xautoclaim(stream, group, consumer2, min_idle_time=0) - assert response == [b"0-0", []] + try: + assert response == [b"0-0", []] + except AssertionError: + assert response == [b"0-0", [], []] # read the group as consumer1 to initially claim the messages r.xreadgroup(group, consumer1, streams={stream: ">"}) |