diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-03-04 09:06:03 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-03-04 09:06:03 +0100 |
commit | 72bcdbd0a0c8cc6aa2a7433169aa49c7fc19b55b (patch) | |
tree | 09e28dfbad901791a8306e890f69a6b737d20a03 /test/testlib/asserts.py | |
parent | 4956c1e618bfcfeef86c6ea90c22dd04ca81b9db (diff) | |
download | gitpython-72bcdbd0a0c8cc6aa2a7433169aa49c7fc19b55b.tar.gz |
Converted all tabs to 4 space characters each to comply with pep8
Diffstat (limited to 'test/testlib/asserts.py')
-rw-r--r-- | test/testlib/asserts.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/testlib/asserts.py b/test/testlib/asserts.py index 46fcf20e..fa754b92 100644 --- a/test/testlib/asserts.py +++ b/test/testlib/asserts.py @@ -11,40 +11,40 @@ 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_none', 'assert_not_none', + 'assert_match', 'assert_not_match', 'assert_mode_644', + 'assert_mode_755'] + tools.__all__ def assert_instance_of(expected, actual, msg=None): - """Verify that object is an instance of expected """ - assert isinstance(actual, expected), msg + """Verify that object is an instance of expected """ + assert isinstance(actual, expected), msg def assert_not_instance_of(expected, actual, msg=None): - """Verify that object is not an instance of expected """ - assert not isinstance(actual, expected, msg) - + """Verify that object is not an instance of expected """ + assert not isinstance(actual, expected, msg) + def assert_none(actual, msg=None): - """verify that item is None""" - assert actual is None, msg + """verify that item is None""" + assert actual is None, msg def assert_not_none(actual, msg=None): - """verify that item is None""" - assert actual is not None, msg + """verify that item is None""" + assert actual is not None, msg def assert_match(pattern, string, msg=None): - """verify that the pattern matches the string""" - assert_not_none(re.search(pattern, string), msg) + """verify that the pattern matches the string""" + assert_not_none(re.search(pattern, string), msg) def assert_not_match(pattern, string, msg=None): - """verify that the pattern does not match the string""" - assert_none(re.search(pattern, string), msg) - + """verify that the pattern does not match the string""" + assert_none(re.search(pattern, string), msg) + def assert_mode_644(mode): - """Verify given mode is 644""" - assert (mode & stat.S_IROTH) and (mode & stat.S_IRGRP) - assert (mode & stat.S_IWUSR) and (mode & stat.S_IRUSR) and not (mode & stat.S_IXUSR) + """Verify given mode is 644""" + assert (mode & stat.S_IROTH) and (mode & stat.S_IRGRP) + assert (mode & stat.S_IWUSR) and (mode & stat.S_IRUSR) and not (mode & stat.S_IXUSR) def assert_mode_755(mode): - """Verify given mode is 755""" - assert (mode & stat.S_IROTH) and (mode & stat.S_IRGRP) and (mode & stat.S_IXOTH) and (mode & stat.S_IXGRP) - assert (mode & stat.S_IWUSR) and (mode & stat.S_IRUSR) and (mode & stat.S_IXUSR)
\ No newline at end of file + """Verify given mode is 755""" + assert (mode & stat.S_IROTH) and (mode & stat.S_IRGRP) and (mode & stat.S_IXOTH) and (mode & stat.S_IXGRP) + assert (mode & stat.S_IWUSR) and (mode & stat.S_IRUSR) and (mode & stat.S_IXUSR)
\ No newline at end of file |