def test_3elements(self): card1 = Card("a", "b") card2 = Card("c", "d") card3 = Card("e", "f") x = Deck([card1, card2, card3]) x.shuffle_riffle() self.assertSetEqual(set(x), set([card1, card2, card3]))
def test_full(self): x = Deck() before = set(x) after = set(x) x.shuffle_riffle() self.assertSetEqual(before, after)
def test_1element(self): card = Card("a", "b") x = Deck([card]) x.shuffle_riffle() self.assertEqual(x, [card])
def test_empty(self): x = Deck() x[:] = [] x.shuffle_riffle() self.assertEqual(x, [])