def test_same_english(self): self.assertFalse(self.check.check_single( 'source', 'source', Unit(code='en'), 0 ))
def test_named_format(self): self.assertFalse( self.check.check_format(u'%1$s string', u'%1$s string', Unit('php_named_format'), 0, False))
def test_no_format(self): self.assertFalse( self.check.check_format('strins', 'string', Unit('php_no_format'), 0, False))
def test_wrong_named_format(self): self.assertTrue( self.check.check_format(u'%(name)s string', u'%(jmeno)s string', Unit('python_wrong_named_format'), 0, False))
def test_wrong_format(self): self.assertTrue( self.check.check_format(u'%s string', u'%c string', Unit('python_wrong_format'), 0, False))
def test_missing_named_format_ignore(self): self.assertFalse( self.check.check_format(u'%(name)s string', u'string', Unit('python_missing_named_format'), 0, True))
def test_named_format(self): self.assertFalse( self.check.check_format(u'%(name)s string', u'%(name)s string', Unit('python_named_format'), 0, False))
def test_percent_format(self): self.assertFalse( self.check.check_format(u'%d%% string', u'%d%% string', Unit('python_percent_format'), 0, False))
def test_wrong_named_format(self): self.assertTrue( self.check.check_format(u'%10s string', u'%20s string', Unit('c_wrong_named_format'), 0, False))
def test_missing_format(self): self.assertTrue( self.check.check_format(u'%s string', u'string', Unit('c_missing_format'), 0, False))
def test_format(self): self.assertFalse( self.check.check_format(u'%s string', u'%s string', Unit('c_format'), 0, False))
def test_missing_named_format(self): self.assertTrue( self.check.check_format(u'%1$s string', u'string', Unit('php_missing_named_format'), 0, False))
def test_failing(self): self.assertTrue(self.check.check_source( ['text...'], Unit(), ))
def test_good(self): self.assertFalse(self.check.check_source( [u'text…'], Unit(), ))
def test_none(self): self.assertFalse(self.check.check_source( ['text'], Unit(), ))
def test_plural(self): self.assertFalse(self.check.check_source( ['text', 'texts'], Unit(), ))