diff options
author | Avital Fine <79420960+AvitalFineRedis@users.noreply.github.com> | 2021-10-21 16:23:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 17:23:33 +0300 |
commit | cf5c5865bb9947498f3810b028628f3d2ab14030 (patch) | |
tree | ec82815fd8ee5b5a6bdb774d23c53a0380865d6c /tests/test_commands.py | |
parent | 638164b15840eddc0c58ae62d3e384b218d31c58 (diff) | |
download | redis-py-cf5c5865bb9947498f3810b028628f3d2ab14030.tar.gz |
Enable floating parameters in SET (ex and px) (#1635)
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r-- | tests/test_commands.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py index faa1e92..fec453f 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1104,6 +1104,8 @@ class TestRedisCommands: assert r['a'] == b'1' assert 0 < r.pttl('a') <= 10000 assert 0 < r.ttl('a') <= 10 + with pytest.raises(exceptions.DataError): + assert r.set('a', '1', px=10.0) @skip_if_server_version_lt('2.6.0') def test_set_px_timedelta(self, r): @@ -1116,6 +1118,8 @@ class TestRedisCommands: def test_set_ex(self, r): assert r.set('a', '1', ex=10) assert 0 < r.ttl('a') <= 10 + with pytest.raises(exceptions.DataError): + assert r.set('a', '1', ex=10.0) @skip_if_server_version_lt('2.6.0') def test_set_ex_timedelta(self, r): |