예제 #1
0
    def test_build_index(self):
        u = Unifier()

        p1 = ('add', 'foo', [(0, 0)])
        p2 = ('add', 'foo', [(0, 1)])
        c = Conflict(p1, p2)

        u._build_index([c])

        self.assertEqual(u._index[nested_hash(p1)], c)
        self.assertEqual(u._index[nested_hash(p2)], c)
예제 #2
0
    def test_build_index(self):
        u = Unifier()

        p1 = ("add", "foo", [(0, 0)])
        p2 = ("add", "foo", [(0, 1)])
        c = Conflict(p1, p2)

        u._build_index([c])

        self.assertEqual(u._index[nested_hash(p1)], c)
        self.assertEqual(u._index[nested_hash(p2)], c)
예제 #3
0
 def test_nested_hash(self):
     # No reasonable way to test this
     nested_hash([1, 2, 3])
     nested_hash((1, 2, 3))
     nested_hash(set([1, 2, 3]))
     nested_hash({'foo': 'bar'})
예제 #4
0
 def test_nested_hash(self):
     # No reasonable way to test this
     nested_hash([1, 2, 3])
     nested_hash((1, 2, 3))
     nested_hash(set([1, 2, 3]))
     nested_hash({'foo': 'bar'})