A little work on improving our coverage reports for Pecan. This gets us
to 99% coverage. Just a few tests needed for SQLAlchemy JSON support and a redirect test.
This commit is contained in:
2
.coveragerc
Normal file
2
.coveragerc
Normal file
@@ -0,0 +1,2 @@
|
||||
[run]
|
||||
omit = pecan/commands/*.py, pecan/templates/__init__.py
|
@@ -12,7 +12,7 @@ from paste.recursive import ForwardRequestException
|
||||
|
||||
try:
|
||||
from simplejson import loads
|
||||
except ImportError:
|
||||
except ImportError: # pragma: no cover
|
||||
from json import loads
|
||||
|
||||
import os
|
||||
|
@@ -8,10 +8,6 @@ __all__ = ['PecanHook', 'TransactionHook', 'HookController']
|
||||
|
||||
|
||||
def walk_controller(root_class, controller, hooks):
|
||||
if hasattr(controller, '_lookup'):
|
||||
# TODO: what about this?
|
||||
pass
|
||||
|
||||
if not isinstance(controller, (int, dict)):
|
||||
for name, value in getmembers(controller):
|
||||
if name == 'controller': continue
|
||||
|
@@ -1,6 +1,6 @@
|
||||
try:
|
||||
from simplejson import JSONEncoder
|
||||
except ImportError:
|
||||
except ImportError: # pragma: no cover
|
||||
from json import JSONEncoder
|
||||
|
||||
from datetime import datetime, date
|
||||
|
Reference in New Issue
Block a user