Skip to content

Commit

Permalink
Added more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rik0 committed Apr 20, 2011
1 parent 951a643 commit 0b9988c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion bimap_test.py
Expand Up @@ -4,7 +4,7 @@

import unittest

class MyTestCase(unittest.TestCase):
class SimpleTests(unittest.TestCase):
def setUp(self):
self.bimap = bimap.Bimap()

Expand All @@ -14,5 +14,18 @@ def test_add(self):
self.assertEquals(len(self.bimap), 1)


class OneElementTests(unittest.TestCase):
def setUp(self):
self.key = 'foo'
self.value = 'bar'
self.bimap = bimap.Bimap()
self.bimap,add(self.key, self.value)

def testGetKey(self):
self.assertEqual(self.bimap.get(self.key), self.value)
self.assertEqual(self.bimap[self.key], self.value)
self.assertEqual(self.bimap.left_get(self.key), self.value)


if __name__ == '__main__':
unittest.main()

0 comments on commit 0b9988c

Please sign in to comment.