def METHOD_NAME(self):
    fmt = string.Formatter()
    self.assertEqual(fmt.format("foo"), "foo")
    self.assertEqual(fmt.format("foo{0}", "bar"), "foobar")
    self.assertEqual(fmt.format("foo{1}{0}-{1}", "bar", 6), "foo6bar-6")
    self.assertRaises(TypeError, fmt.format)
    self.assertRaises(TypeError, string.Formatter.format)