Beispiel #1
0
    def test_copy_pair_several_times(self):
        p = self.new_pair('foo', 'bar')
        for i in xrange(10):
            other = pair_copy(p)
            self.addCleanup(pair_destroy, other)

        self.assertEqual(pair_is_equal(p, other), True)
Beispiel #2
0
    def test_copy_pair(self):
        p = self.new_pair('foo', 'bar')
        other = pair_copy(p)
        self.addCleanup(pair_destroy, other)

        self.assertEqual(pair_is_equal(p, other), True)
Beispiel #3
0
    def test_is_not_equal_other_both_different(self):
        p1 = self.new_pair('foo', 'barr')
        p2 = self.new_pair('fooo', 'bar')

        self.assertEqual(pair_is_equal(p1, p2), False)
Beispiel #4
0
    def test_is_not_equal_other_different_index_and_same_data(self):
        p1 = self.new_pair('foo', 'bar')
        p2 = self.new_pair('fooo', 'bar')

        self.assertEqual(pair_is_equal(p1, p2), False)
Beispiel #5
0
    def test_is_not_equal_other_empty_index_and_empty_data(self):
        p1 = self.new_pair('foo', 'bar')
        p2 = self.new_pair('', '')

        self.assertEqual(pair_is_equal(p1, p2), False)
Beispiel #6
0
    def test_is_equal_non_empty_index_and_non_empty_data(self):
        p1 = self.new_pair('foo', 'bar')
        p2 = self.new_pair('foo', 'bar')

        self.assertEqual(pair_is_equal(p1, p2), True)