#NEWLINE# @ pytest . mark . django_project ( project_root = 'django_project_root' , create_manage_py = True ) #NEWLINE# def test_django_project_found_invalid_settings_version( django_testdir , monkeypatch ) : #NEWLINE# #INDENT# 'Invalid DSM should not cause an error with --help or --version.' #NEWLINE# monkeypatch . setenv ( 'DJANGO_SETTINGS_MODULE' , 'DOES_NOT_EXIST' ) #NEWLINE# result = django_testdir . runpytest_subprocess ( 'django_project_root' , '--version' ) #NEWLINE# assert ( result . ret == 0 ) #NEWLINE# result . stderr . fnmatch_lines ( [ '*This is pytest version*' ] ) #NEWLINE# result = django_testdir . runpytest_subprocess ( 'django_project_root' , '--help' ) #NEWLINE# assert ( result . ret == 0 ) #NEWLINE# result . stdout . fnmatch_lines ( [ '*usage:*' ] )