def METHOD_NAME(self):
    self.assertEqual(translate('*'), r'(?s:.*)\Z')
    self.assertEqual(translate('?'), r'(?s:.)\Z')
    self.assertEqual(translate('a?b*'), r'(?s:a.b.*)\Z')
    self.assertEqual(translate('[abc]'), r'(?s:[abc])\Z')
    self.assertEqual(translate('[]]'), r'(?s:[]])\Z')
    self.assertEqual(translate('[!x]'), r'(?s:[^x])\Z')
    self.assertEqual(translate('[^x]'), r'(?s:[\^x])\Z')
    self.assertEqual(translate('[x'), r'(?s:\[x)\Z')