forked from orbit-oss/flask
Merge pull request #2530 from pallets/feature/factory-detection
Improved bad factory error handling
This commit is contained in:
commit
03a2996bb8
2 changed files with 36 additions and 0 deletions
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue