deb-python-gabbi/gabbi/exception.py
Chris Dent 895119af66 Send a warning when a yaml filename has an underscore (#157)
TestSuites are grouped by test runners by the name that is
generated for the tests within. To ease that grouping it is
useful to have filenames with a known set of characters.

Grouping is also used for py.test fixture handling.

This change raises a warning if a filename has an '_' in it,
effectively declaring that though it is possible to use '_',
it can impact grouping.

Fixes #144
2016-06-16 13:41:56 +01:00

24 lines
798 B
Python

#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Gabbi specific exceptions."""
class GabbiFormatError(ValueError):
"""An exception to encapsulate poorly formed test data."""
pass
class GabbiSyntaxWarning(SyntaxWarning):
"""A warning about syntax that is not desirable."""
pass