def testList(self): """computeTokenTypes(['a', 'b']) -> { 'a': 0, 'b': 1 }""" typeMap = computeTokenTypes(['a', 'b']) self.failUnless(isinstance(typeMap, dict)) self.failUnlessEqual(typeMap, { 'a': 0, 'b': 1 })
def testNone(self): """computeTokenTypes(None) -> {}""" typeMap = computeTokenTypes(None) self.failUnless(isinstance(typeMap, dict)) self.failUnlessEqual(typeMap, {})
def testList(self): """computeTokenTypes(['a', 'b']) -> { 'a': 0, 'b': 1 }""" typeMap = computeTokenTypes(['a', 'b']) self.assertIsInstance(typeMap, dict) self.assertEqual(typeMap, { 'a': 0, 'b': 1 })
def testNone(self): """computeTokenTypes(None) -> {}""" typeMap = computeTokenTypes(None) self.assertIsInstance(typeMap, dict) self.assertEqual(typeMap, {})
def testList(self): """computeTokenTypes(['a', 'b']) -> { 'a': 0, 'b': 1 }""" typeMap = computeTokenTypes(['a', 'b']) self.assertIsInstance(typeMap, dict) self.assertEqual(typeMap, {'a': 0, 'b': 1})