diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-11-11 12:38:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 12:38:27 +0200 |
commit | 6a293e685d27894bc99ea4c0c7312c81f099ca45 (patch) | |
tree | 1618e553a5a7010782b5dc6574fc40d827960bd4 /tests/test_scripting.py | |
parent | ec172e74bbccd32627835d67eddac704fe9ba31b (diff) | |
download | redis-py-6a293e685d27894bc99ea4c0c7312c81f099ca45.tar.gz |
Fixes to allow --redis-url to pass through all tests (#1700)
Diffstat (limited to 'tests/test_scripting.py')
-rw-r--r-- | tests/test_scripting.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test_scripting.py b/tests/test_scripting.py index c3c2094..352f3ba 100644 --- a/tests/test_scripting.py +++ b/tests/test_scripting.py @@ -2,6 +2,8 @@ import pytest from redis import exceptions +from tests.conftest import skip_if_server_version_lt + multiply_script = """ local value = redis.call('GET', KEYS[1]) @@ -30,7 +32,8 @@ class TestScripting: # 2 * 3 == 6 assert r.eval(multiply_script, 1, 'a', 3) == 6 - def test_script_flush(self, r): + @skip_if_server_version_lt('6.2.0') + def test_script_flush_620(self, r): r.set('a', 2) r.script_load(multiply_script) r.script_flush('ASYNC') @@ -43,6 +46,12 @@ class TestScripting: r.script_load(multiply_script) r.script_flush() + with pytest.raises(exceptions.DataError): + r.set('a', 2) + r.script_load(multiply_script) + r.script_flush("NOTREAL") + + def test_script_flush(self, r): r.set('a', 2) r.script_load(multiply_script) r.script_flush(None) |