def test_regex_bad_pattern():
 assert_raises(re.error, inputs.regex, '[')

def test_regex_bad_pattern ( ) : assert_raises ( re . error , inputs . regex , '[' )
regex error raised immediately when regex input parser is created .