diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..ec9a6c5 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +omit = pecan/commands/*.py, pecan/templates/__init__.py diff --git a/pecan/core.py b/pecan/core.py index b8a37d0..2f268cb 100644 --- a/pecan/core.py +++ b/pecan/core.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 diff --git a/pecan/hooks.py b/pecan/hooks.py index 745c112..67d7d38 100644 --- a/pecan/hooks.py +++ b/pecan/hooks.py @@ -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 diff --git a/pecan/jsonify.py b/pecan/jsonify.py index 60e4883..3b6c150 100644 --- a/pecan/jsonify.py +++ b/pecan/jsonify.py @@ -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