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-")
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