def test_no_spaces(self): self.assertEqual(to_t9(' a a a'), '020202') self.assertEqual(to_t9('a a a'), '20 020 02') self.assertEqual(to_t9('a bb ccc'), '20 022 220 0222 222 222') self.assertEqual( to_t9('hddqnetqpduyzoejlmymlfvlkdg emmhhrearl uthlnjnewxfmraboxsmtrf '), '443 3776633877 7388999 9999666335 55569996555333888555 55340336 644 44777332777555088 84455566566339 9933367772 22666997777687773330 0')
def test_no_spaces(self): self.assertEqual(to_t9(' a a a'), '020202') self.assertEqual(to_t9('a a a'), '20 020 02') self.assertEqual(to_t9('a bb ccc'), '20 022 220 0222 222 222') self.assertEqual( to_t9( 'hddqnetqpduyzoejlmymlfvlkdg emmhhrearl uthlnjnewxfmraboxsmtrf ' ), '443 3776633877 7388999 9999666335 55569996555333888555 55340336 644 44777332777555088 84455566566339 9933367772 22666997777687773330 0' )
def test_no_spaces(self): self.assertEqual(to_t9("yes"), "999337777") self.assertEqual(to_t9("no"), "66 666") self.assertEqual(to_t9("allyour"), "2555 55599966688777") self.assertEqual(to_t9("baseare"), "22 2777733277733") self.assertEqual(to_t9("belongto"), "2233555666 6648666") self.assertEqual(to_t9("nexttimewontyou"), "6633998 84446339666 66899966688")
def test_no_spaces(self): self.assertEqual(to_t9('yes'), '999337777') self.assertEqual(to_t9('no'), '66 666') self.assertEqual(to_t9('allyour'), '2555 55599966688777') self.assertEqual(to_t9('baseare'), '22 2777733277733') self.assertEqual(to_t9('belongto'), '2233555666 6648666') self.assertEqual(to_t9('nexttimewontyou'), '6633998 84446339666 66899966688')
def test_with_two_spaces(self): self.assertEqual(to_t9("foo bar"), "333666 6660 022 2777")
def test_with_one_space(self): self.assertEqual(to_t9("foo bar"), "333666 666022 2777") self.assertEqual(to_t9("hello world"), "4433555 555666096667775553")
def test_with_two_spaces(self): self.assertEqual(to_t9('foo bar'), '333666 6660 022 2777')
def test_with_one_space(self): self.assertEqual(to_t9('foo bar'), '333666 666022 2777') self.assertEqual(to_t9('hello world'), '4433555 555666096667775553')