[ 49s] __________________ test_eval_global_variable[FakeStrictRedis] __________________
[ 49s]
[ 49s] r = FakeStrictRedis<ConnectionPool<FakeConnection<server=<fakeredis._server.FakeServer object at 0x7f3a26ace250>,db=0>>>
[ 49s]
[ 49s] def test_eval_global_variable(r):
[ 49s] # Redis doesn't allow script to define global variables
[ 49s] with pytest.raises(ResponseError):
[ 49s] > r.eval('a=10', 0)
[ 49s]
[ 49s] test/test_lua.py:214:
[ 49s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 49s] /usr/lib/python3.8/site-packages/redis/commands/core.py:5054: in eval
[ 49s] return self._eval("EVAL", script, numkeys, *keys_and_args)
[ 49s] /usr/lib/python3.8/site-packages/redis/commands/core.py:5039: in _eval
[ 49s] return self.execute_command(command, script, numkeys, *keys_and_args)
[ 49s] /usr/lib/python3.8/site-packages/redis/client.py:1235: in execute_command
[ 49s] return conn.retry.call_with_retry(
[ 49s] /usr/lib/python3.8/site-packages/redis/retry.py:46: in call_with_retry
[ 49s] return do()
[ 49s] /usr/lib/python3.8/site-packages/redis/client.py:1236: in <lambda>
[ 49s] lambda: self._send_command_parse_response(
[ 49s] /usr/lib/python3.8/site-packages/redis/client.py:1211: in _send_command_parse_response
[ 49s] conn.send_command(*args)
[ 49s] /usr/lib/python3.8/site-packages/redis/connection.py:797: in send_command
[ 49s] self.send_packed_command(
[ 49s] /usr/lib/python3.8/site-packages/redis/connection.py:779: in send_packed_command
[ 49s] self._sock.sendall(item)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:208: in sendall
[ 49s] self._parser.send(data)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:118: in _parse_commands
[ 49s] self._process_command(fields)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:238: in _process_command
[ 49s] result = self._run_command(func, sig, fields[1:], False)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:139: in _run_command
[ 49s] result = func(*args)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_fakesocket.py:1606: in eval
[ 49s] self._check_for_lua_globals(lua_runtime, expected_globals)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_fakesocket.py:1528: in _check_for_lua_globals
[ 49s] unexpected = [self.ensure_str(var, 'utf-8', 'replace')
[ 49s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 49s]
[ 49s] .0 = <set_iterator object at 0x7f3a2715c0c0>
[ 49s]
[ 49s] > unexpected = [self.ensure_str(var, 'utf-8', 'replace')
[ 49s] for var in actual_globals - expected_globals]
[ 49s] E TypeError: ensure_str() takes 2 positional arguments but 4 were given
[ 49s]
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_fakesocket.py:1528: TypeError
[ 49s] _______________ test_eval_global_and_return_ok[FakeStrictRedis] ________________
[ 49s]
[ 49s] r = FakeStrictRedis<ConnectionPool<FakeConnection<server=<fakeredis._server.FakeServer object at 0x7f3a26b20580>,db=0>>>
[ 49s]
[ 49s] def test_eval_global_and_return_ok(r):
[ 49s] # Redis doesn't allow script to define global variables
[ 49s] with pytest.raises(ResponseError):
[ 49s] > r.eval(
[ 49s] '''
[ 49s] a=10
[ 49s] return redis.status_reply("Everything is awesome")
[ 49s] ''',
[ 49s] 0
[ 49s] )
[ 49s]
[ 49s] test/test_lua.py:220:
[ 49s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 49s] /usr/lib/python3.8/site-packages/redis/commands/core.py:5054: in eval
[ 49s] return self._eval("EVAL", script, numkeys, *keys_and_args)
[ 49s] /usr/lib/python3.8/site-packages/redis/commands/core.py:5039: in _eval
[ 49s] return self.execute_command(command, script, numkeys, *keys_and_args)
[ 49s] /usr/lib/python3.8/site-packages/redis/client.py:1235: in execute_command
[ 49s] return conn.retry.call_with_retry(
[ 49s] /usr/lib/python3.8/site-packages/redis/retry.py:46: in call_with_retry
[ 49s] return do()
[ 49s] /usr/lib/python3.8/site-packages/redis/client.py:1236: in <lambda>
[ 49s] lambda: self._send_command_parse_response(
[ 49s] /usr/lib/python3.8/site-packages/redis/client.py:1211: in _send_command_parse_response
[ 49s] conn.send_command(*args)
[ 49s] /usr/lib/python3.8/site-packages/redis/connection.py:797: in send_command
[ 49s] self.send_packed_command(
[ 49s] /usr/lib/python3.8/site-packages/redis/connection.py:779: in send_packed_command
[ 49s] self._sock.sendall(item)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:208: in sendall
[ 49s] self._parser.send(data)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:118: in _parse_commands
[ 49s] self._process_command(fields)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:238: in _process_command
[ 49s] result = self._run_command(func, sig, fields[1:], False)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_basefakesocket.py:139: in _run_command
[ 49s] result = func(*args)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_fakesocket.py:1606: in eval
[ 49s] self._check_for_lua_globals(lua_runtime, expected_globals)
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_fakesocket.py:1528: in _check_for_lua_globals
[ 49s] unexpected = [self.ensure_str(var, 'utf-8', 'replace')
[ 49s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 49s]
[ 49s] .0 = <set_iterator object at 0x7f3a26cbc480>
[ 49s]
[ 49s] > unexpected = [self.ensure_str(var, 'utf-8', 'replace')
[ 49s] for var in actual_globals - expected_globals]
[ 49s] E TypeError: ensure_str() takes 2 positional arguments but 4 were given
[ 49s]
[ 49s] ../../BUILDROOT/python-fakeredis-1.9.3-0.x86_64/usr/lib/python3.8/site-packages/fakeredis/_fakesocket.py:1528: TypeError
[ 49s] =============================== warnings summary ===============================
[ 49s] test/test_connection.py::TestFakeStrictRedisConnectionErrors::test_hmset[FakeStrictRedis]
[ 49s] /home/abuild/rpmbuild/BUILD/fakeredis-py-1.9.3/test/test_connection.py:258: DeprecationWarning: FakeStrictRedis.hmset() is deprecated. Use FakeStrictRedis.hset() instead.
[ 49s] r.hmset('name', {'key': 1})
[ 49s]
[ 49s] test/test_fakeredis6.py::test_hmset_empty_raises_error[FakeStrictRedis]
[ 49s] /home/abuild/rpmbuild/BUILD/fakeredis-py-1.9.3/test/test_fakeredis6.py:1543: DeprecationWarning: FakeStrictRedis.hmset() is deprecated. Use FakeStrictRedis.hset() instead.
[ 49s] r.hmset('foo', {})
[ 49s]
[ 49s] test/test_fakeredis6.py::test_hmset[FakeStrictRedis]
[ 49s] /home/abuild/rpmbuild/BUILD/fakeredis-py-1.9.3/test/test_fakeredis6.py:1548: DeprecationWarning: FakeStrictRedis.hmset() is deprecated. Use FakeStrictRedis.hset() instead.
[ 49s] assert r.hmset('foo', {'k2': 'v2', 'k3': 'v3'}) is True
[ 49s]
[ 49s] test/test_fakeredis6.py::test_hmset_wrong_type[FakeStrictRedis]
[ 49s] /home/abuild/rpmbuild/BUILD/fakeredis-py-1.9.3/test/test_fakeredis6.py:1554: DeprecationWarning: FakeStrictRedis.hmset() is deprecated. Use FakeStrictRedis.hset() instead.
[ 49s] r.hmset('foo', {'key': 'value'})
[ 49s]
[ 49s] -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
[ 49s] =========================== short test summary info ============================
[ 49s] FAILED test/test_lua.py::test_eval_global_variable[FakeStrictRedis] - TypeErr...
[ 49s] FAILED test/test_lua.py::test_eval_global_and_return_ok[FakeStrictRedis] - Ty...
[ 49s] =========== 2 failed, 652 passed, 632 skipped, 4 warnings in 44.62s ============