Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename TestError to ExampleError to avoid PytestCollectionWarning #1396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/test_exc.py
@@ -1,7 +1,7 @@
import bottle
from .tools import ServerTestBase

class TestError(Exception):
class ExampleError(Exception):
pass

class TestAppException(ServerTestBase):
Expand All @@ -18,13 +18,13 @@ def test(): raise MemoryError

def test_other_error(self):
@bottle.route('/')
def test(): raise TestError
self.assertRaises(TestError)
def test(): raise ExampleError
self.assertRaises(ExampleError)

def test_noncatched_error(self):
@bottle.route('/')
def test(): raise TestError
def test(): raise ExampleError
bottle.request.environ['exc_info'] = None
bottle.catchall = False
self.assertStatus(500, '/')
self.assertInBody('TestError')
self.assertInBody('ExampleError')