def test_must_have__and_extra_formats(): expected = "nothing to add" try: must_have(False, expected, "foo", "bar") except RadulaError as e: actual = e.message assert_equal(expected, actual)
def test_must_have__and_formats(): expected = "hello foo and bar" try: must_have(False, "hello {0} and {1}", "foo", "bar") except RadulaError as e: actual = e.message assert_equal(expected, actual)
def test_must_have__and_doesnt(): must_have(False, "message")
def test_must_have__and_does(): must_have(True, "message")