Пример #1
0
 def test_builds_with_dash(self):
     self.assert_(callable(compiler.builds("foobar")))
     self.assert_(callable(compiler.builds("foo_bar")))
     self.assert_(callable(compiler.builds("-")))
     self.assertRaisesRegexp(TypeError,
                             "\*post\* translated strings",
                             compiler.builds, "foobar-with-dash-")
Пример #2
0
 def test_builds_with_dash(self):
     self.assert_(callable(compiler.builds("foobar")))
     self.assert_(callable(compiler.builds("foo_bar")))
     self.assert_(callable(compiler.builds("-")))
     self.assertRaisesRegexp(TypeError,
                             "\*post\* translated strings",
                             compiler.builds, "foobar-with-dash-")
Пример #3
0
def test_builds_with_dash():
    assert callable(compiler.builds("foobar"))
    assert callable(compiler.builds("foo_bar"))
    assert callable(compiler.builds("-"))
    try:
        compiler.builds("foobar-with-dash-")
    except TypeError as e:
        assert "*post* translated strings" in str(e)
    else:
        assert False
Пример #4
0
def test_builds_with_dash():
    assert callable(compiler.builds("foobar"))
    assert callable(compiler.builds("foo_bar"))
    assert callable(compiler.builds("-"))
    try:
        compiler.builds("foobar-with-dash-")
    except TypeError as e:
        assert "*post* translated strings" in str(e)
    else:
        assert False