#NEWLINE# @ only_bootstrap #NEWLINE# def test_error_text_inline( settings ) : #NEWLINE# #INDENT# form = TestForm ( { #NEWLINE# #INDENT# 'email' : 'invalidemail' , #NEWLINE# #UNINDENT# } ) #NEWLINE# form . helper = FormHelper ( ) #NEWLINE# layout = Layout ( AppendedText ( 'first_name' , 'wat' ) , PrependedText ( 'email' , '@' ) , PrependedAppendedText ( 'last_name' , '@' , 'wat' ) ) #NEWLINE# form . helper . layout = layout #NEWLINE# form . is_valid ( ) #NEWLINE# html = render_crispy_form ( form ) #NEWLINE# help_class = 'help-inline' #NEWLINE# if ( settings . CRISPY_TEMPLATE_PACK in [ 'bootstrap3' , 'bootstrap4' ] ) : #NEWLINE# #INDENT# help_class = 'help-block' #NEWLINE# #UNINDENT# matches = re . findall ( ( '<span id="error_\\d_\\w*" class="%s"' % help_class ) , html , re . MULTILINE ) #NEWLINE# assert ( len ( matches ) == 3 ) #NEWLINE# form = TestForm ( { #NEWLINE# #INDENT# 'email' : 'invalidemail' , #NEWLINE# #UNINDENT# } ) #NEWLINE# form . helper = FormHelper ( ) #NEWLINE# form . helper . layout = layout #NEWLINE# form . helper . error_text_inline = False #NEWLINE# html = render_crispy_form ( form ) #NEWLINE# matches = re . findall ( '<p id="error_\\d_\\w*" class="help-block"' , html , re . MULTILINE ) #NEWLINE# assert ( len ( matches ) == 3 )