Merge pull request #2530 from pallets/feature/factory-detection

Improved bad factory error handling
This commit is contained in:
David Lord 2018-01-28 11:27:07 -08:00 committed by GitHub
commit 03a2996bb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View file

@ -135,6 +135,13 @@ def test_find_best_app(test_apps):
pytest.raises(NoAppException, find_best_app, script_info, Module)
class Module:
@staticmethod
def create_app():
raise TypeError('bad bad factory!')
pytest.raises(TypeError, find_best_app, script_info, Module)
@pytest.mark.parametrize('value,path,result', (
('test', cwd, 'test'),