mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-16 10:57:35 +08:00
rename excpetion module to exceptions
This commit is contained in:
54
httprunner/exceptions.py
Normal file
54
httprunner/exceptions.py
Normal file
@@ -0,0 +1,54 @@
|
||||
# encoding: utf-8
|
||||
|
||||
from httprunner.compat import JSONDecodeError, FileNotFoundError
|
||||
|
||||
""" failure type exceptions
|
||||
these exceptions will mark test as failure
|
||||
"""
|
||||
|
||||
class MyBaseFailure(BaseException):
|
||||
pass
|
||||
|
||||
class ValidationFailure(MyBaseFailure):
|
||||
pass
|
||||
|
||||
class ResponseFailure(MyBaseFailure):
|
||||
pass
|
||||
|
||||
class ParseResponseFailure(MyBaseFailure):
|
||||
pass
|
||||
|
||||
|
||||
""" error type exceptions
|
||||
these exceptions will mark test as error
|
||||
"""
|
||||
|
||||
class MyBaseError(BaseException):
|
||||
pass
|
||||
|
||||
class FileFormatError(MyBaseError):
|
||||
pass
|
||||
|
||||
class ParamsError(MyBaseError):
|
||||
pass
|
||||
|
||||
class NotFoundError(MyBaseError):
|
||||
pass
|
||||
|
||||
class FileNotFound(FileNotFoundError, NotFoundError):
|
||||
pass
|
||||
|
||||
class FunctionNotFound(NotFoundError):
|
||||
pass
|
||||
|
||||
class VariableNotFound(NotFoundError):
|
||||
pass
|
||||
|
||||
class ApiNotFound(NotFoundError):
|
||||
pass
|
||||
|
||||
class SuiteNotFound(NotFoundError):
|
||||
pass
|
||||
|
||||
class TestcaseNotFound(NotFoundError):
|
||||
pass
|
||||
Reference in New Issue
Block a user