diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 14:25:39 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 14:25:39 +0100 |
commit | 1b9d3b961bdf79964b883d3179f085d8835e528d (patch) | |
tree | 7031b7853f92879ee2e106f1e4fbf302c5c20ea6 /git/test/lib | |
parent | c80d727e374321573bb00e23876a67c77ff466e3 (diff) | |
download | gitpython-1b9d3b961bdf79964b883d3179f085d8835e528d.tar.gz |
Removed 'from X import *' whereever possible
Diffstat (limited to 'git/test/lib')
-rw-r--r-- | git/test/lib/__init__.py | 5 | ||||
-rw-r--r-- | git/test/lib/asserts.py | 20 |
2 files changed, 18 insertions, 7 deletions
diff --git a/git/test/lib/__init__.py b/git/test/lib/__init__.py index 26ea13a3..033a1104 100644 --- a/git/test/lib/__init__.py +++ b/git/test/lib/__init__.py @@ -5,9 +5,8 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import inspect -from mock import * -from asserts import * -from helper import * +from .asserts import * +from .helper import * __all__ = [name for name, obj in locals().items() if not (name.startswith('_') or inspect.ismodule(obj))] diff --git a/git/test/lib/asserts.py b/git/test/lib/asserts.py index 6f6d8960..98751d4d 100644 --- a/git/test/lib/asserts.py +++ b/git/test/lib/asserts.py @@ -5,15 +5,27 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import re -from nose import tools -from nose.tools import * import stat __all__ = ['assert_instance_of', 'assert_not_instance_of', 'assert_none', 'assert_not_none', 'assert_match', 'assert_not_match', 'assert_mode_644', - 'assert_mode_755'] + tools.__all__ - + 'assert_mode_755', + 'assert_equal', 'assert_not_equal', 'assert_raises', 'patch', 'raises', + 'assert_true', 'assert_false'] + +from nose.tools import ( + assert_equal, + assert_not_equal, + assert_raises, + raises, + assert_true, + assert_false +) + +from mock import ( + patch +) def assert_instance_of(expected, actual, msg=None): """Verify that object is an instance of expected """ |