Skip to content

Commit

Permalink
100% test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
cortesi committed Mar 2, 2013
1 parent 0acab86 commit 1fe1a80
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netlib/http_auth.py
Expand Up @@ -96,7 +96,7 @@ def __init__(self, fp):
salt = parts[2],
hashed_password = parts[3]
)

def test(self, username, password_token):
ui = self.usernames.get(username)
if not ui:
Expand Down
2 changes: 1 addition & 1 deletion netlib/tcp.py
Expand Up @@ -298,7 +298,7 @@ def finish(self):
self.close()
self.wfile.close()
self.rfile.close()
except socket.error:
except (socket.error, NetLibDisconnect):
# Remote has disconnected
pass

Expand Down
1 change: 1 addition & 0 deletions test/test_http.py
Expand Up @@ -2,6 +2,7 @@
from netlib import http, odict
import tutils


def test_httperror():
e = http.HttpError(404, "Not found")
assert str(e)
Expand Down
3 changes: 3 additions & 0 deletions test/test_imports.py
@@ -0,0 +1,3 @@
# These are actually tests!
import netlib.http_status
import netlib.version

0 comments on commit 1fe1a80

Please sign in to comment.