Skip to content

Commit

Permalink
coverage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
petr-s committed Mar 8, 2016
1 parent e7c1288 commit 04d2b5a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[report]
exclude_lines =
pragma: no cover
10 changes: 5 additions & 5 deletions clearest/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from collections import defaultdict
from copy import deepcopy

try:
from urllib.parse import parse_qs
except ImportError:
from urlparse import parse_qs
try: # pragma: no cover
from urllib.parse import parse_qs # pragma: no cover
except ImportError: # pragma: no cover
from urlparse import parse_qs # pragma: no cover

import six

Expand Down Expand Up @@ -146,7 +146,7 @@ def wrapped(*args, **kwargs):

@abstractmethod
def type(self):
pass
pass # pragma: no cover


class GET(BaseDecorator):
Expand Down
8 changes: 8 additions & 0 deletions tests/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ class Test(TestCase):
def setUp(self):
unregister_all()

def test_decorator_none_path(self):
def test_fn():
@GET(None)
def asd():
pass

self.assertRaises(TypeError, test_fn)

def test_decorator_missing_argument(self):
def test_fn():
@GET("/{key}")
Expand Down

0 comments on commit 04d2b5a

Please sign in to comment.