def test_commit_strip_comments_unicode(): """Ensure that unicode is preserved in stripped commit messages""" msg = uchr(0x1234) + '\n\n#comment\nbody' expect = uchr(0x1234) + '\n\nbody\n' actual = cmds.Commit.strip_comments(msg) assert expect == actual
def test_translates_noun(self): """Test that strings with @@noun are translated """ i18n.install('ja_JP') expect = uchr(0x30B3) + uchr(0x30DF) + uchr(0x30C3) + uchr(0x30C8) actual = N_('Commit@@verb') self.assertEqual(expect, actual)
def test_Commit_strip_comments_unicode(self): """Ensure that unicode is preserved in stripped commit messages""" msg = uchr(0x1234) + '\n\n#comment\nbody' expect = uchr(0x1234) + '\n\nbody\n' actual = cmds.Commit.strip_comments(msg) self.assertEqual(expect, actual)
def test_from_filename_unicode(): filename = compat.uchr(0x400) + '.py' expect = 'file-code.svg' actual = icons.basename_from_filename(filename) assert expect == actual actual = icons.basename_from_filename(core.encode(filename)) assert expect == actual
def test_from_filename_unicode(self): filename = compat.uchr(0x400) + '.py' expect = 'file-code.svg' actual = icons.basename_from_filename(filename) self.assertEqual(expect, actual) actual = icons.basename_from_filename(core.encode(filename)) self.assertEqual(expect, actual)