Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an ability to use assert_items_include with tuples #331

Open
palage4a opened this issue Sep 29, 2023 · 0 comments
Open

Add an ability to use assert_items_include with tuples #331

palage4a opened this issue Sep 29, 2023 · 0 comments

Comments

@palage4a
Copy link

palage4a commented Sep 29, 2023

local t = require('luatest')
local g = t.group()

local a = {1,2,3}
local b = box.tuple.new(a)
local c = box.tuple.new(a)

-- unable to assert table with tuple
g.test_table_includes_tuple = function()
    t.assert_items_include(a, b)
end
-- even unable to assert tuple with tuple
g.test_tuple_includes_tuple = function()
    t.assert_items_include(b, c)
end
$ .rocks/bin/luatest ./test
Tarantool version is 2.11.0-0-gc9673ebb7-r575-gc64
FF

Failed tests:
-------------

1) tuples_assert.test_table_includes_tuple
...ge4a/tmp/assert-tuples/app///test/tuples_assert_test.lua:10: Expected all item values from: [1, 2, 3]
To be present in: {1, 2, 3}
stack traceback:
	...ge4a/tmp/assert-tuples/app///test/tuples_assert_test.lua:10: in function 'tuples_assert.test_table_includes_tuple'
	...
	[C]: in function 'xpcall'
2) tuples_assert.test_tuple_includes_tuple
...ge4a/tmp/assert-tuples/app///test/tuples_assert_test.lua:14: Expected all item values from: [1, 2, 3]
To be present in: [1, 2, 3]
stack traceback:
	...ge4a/tmp/assert-tuples/app///test/tuples_assert_test.lua:14: in function 'tuples_assert.test_tuple_includes_tuple'
	...
	[C]: in function 'xpcall'
Ran 2 tests in 0.001 seconds, 0 succeeded, 2 failed

Failed tests:

tuples_assert.test_table_includes_tuple
tuples_assert.test_tuple_includes_tuple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant