mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-04 15:35:25 +08:00
Because the passed argument is not a SA filter, but our own parsed filter, which is a tuple.
19 lines
544 B
Python
19 lines
544 B
Python
from galaxy.managers.base import combine_lists
|
|
|
|
|
|
class NotFalsy:
|
|
"""Class requires explicit check for None"""
|
|
|
|
def __bool__(self):
|
|
raise Exception("not implemented")
|
|
|
|
|
|
def test_combine_lists():
|
|
foo, bar = NotFalsy(), NotFalsy()
|
|
assert combine_lists(foo, None) == [foo]
|
|
assert combine_lists(None, foo) == [foo]
|
|
assert combine_lists(foo, bar) == [foo, bar]
|
|
assert combine_lists([foo, bar], None) == [foo, bar]
|
|
assert combine_lists(None, [foo, bar]) == [foo, bar]
|
|
assert combine_lists(None, None) == []
|