The congress.tests.datalog.test_ordered_set Module

class congress.tests.datalog.test_ordered_set.TestOrderedSet(*args, **kwargs)

Bases: congress.tests.base.TestCase

test_add_known_item()

Test that OrderedSet.add(known) returns False.

test_add_unknown_item()

Test that OrderedSet.add(unknown) returns True.

test_contains()

Test that basic OrderedSet.__contains__ functionality works.

test_creation_simple()

“Test basic OrderedSet instantiation.

test_creation_with_duplicates()

“Test that OrderedSet instantiation removes duplicates.

test_discard_known_item()

Test that OrderedSet.discard(known) returns True.

test_discard_unknown_item()

Test that OrderedSet.discard(unknown) returns False.

test_equals_other_iterable()

Test that OrderedSet-to-other-iterable equality returns False.

test_equals_other_ordered_set()

Test that OrderedSet equality accounts for order.

test_pop_last_item()

Test that OrderedSet.pop() returns the final item.

test_pop_not_first_item()

Test that OrderedSet.pop(last=False) returns the first item.

test_reversed_reverses_order()

Test that reversed(OrderedSet()) reverses correctly.