/usr/lib/python3/dist-packages/pytest_bdd/exceptions.py is in python3-pytest-bdd 2.18.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | """pytest-bdd Exceptions."""
import six
class StepError(Exception):
"""Step declaration error."""
class ScenarioIsDecoratorOnly(Exception):
"""Scenario can be only used as decorator."""
class ScenarioValidationError(Exception):
"""Base class for scenario validation."""
class ScenarioNotFound(ScenarioValidationError):
"""Scenario Not Found."""
class ExamplesNotValidError(ScenarioValidationError):
"""Example table is not valid."""
class ScenarioExamplesNotValidError(ScenarioValidationError):
"""Scenario steps parameters do not match declared scenario examples."""
class FeatureExamplesNotValidError(ScenarioValidationError):
"""Feature example table is not valid."""
class StepTypeError(ScenarioValidationError):
"""Step definition is not of the type expected in the scenario."""
class GivenAlreadyUsed(ScenarioValidationError):
"""Fixture that implements the Given has been already used."""
class StepDefinitionNotFoundError(Exception):
"""Step definition not found."""
class InvalidStepParserError(Exception):
"""Invalid step parser."""
class NoScenariosFound(Exception):
"""No scenarios found."""
@six.python_2_unicode_compatible
class FeatureError(Exception):
"""Feature parse error."""
message = u"{0}.\nLine number: {1}.\nLine: {2}.\nFile: {3}"
def __str__(self):
"""String representation."""
return self.message.format(*self.args)
|