From f5d11b750ecc982541d1f936488248f0b42d75d3 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:15:50 +0100 Subject: pep8 linting (whitespaces) W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file --- git/test/lib/asserts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git/test/lib/asserts.py') diff --git a/git/test/lib/asserts.py b/git/test/lib/asserts.py index fa754b92..52f07eb3 100644 --- a/git/test/lib/asserts.py +++ b/git/test/lib/asserts.py @@ -22,7 +22,7 @@ def assert_instance_of(expected, actual, msg=None): def assert_not_instance_of(expected, actual, msg=None): """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 @@ -38,7 +38,7 @@ def assert_match(pattern, string, msg=None): def assert_not_match(pattern, string, msg=None): """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) @@ -47,4 +47,4 @@ def assert_mode_644(mode): 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 + assert (mode & stat.S_IWUSR) and (mode & stat.S_IRUSR) and (mode & stat.S_IXUSR) -- cgit v1.2.1 From be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:51:04 +0100 Subject: pep8 linting (blank lines expectations) E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n) --- git/test/lib/asserts.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'git/test/lib/asserts.py') diff --git a/git/test/lib/asserts.py b/git/test/lib/asserts.py index 52f07eb3..ec3eef96 100644 --- a/git/test/lib/asserts.py +++ b/git/test/lib/asserts.py @@ -15,35 +15,43 @@ __all__ = ['assert_instance_of', 'assert_not_instance_of', '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 + def assert_not_instance_of(expected, actual, msg=None): """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 + def assert_not_none(actual, msg=None): """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) + def assert_not_match(pattern, string, msg=None): """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) + 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) -- cgit v1.2.1 From c8e70749887370a99adeda972cc3503397b5f9a7 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 21:09:47 +0100 Subject: pep8 linting (trailing whitespace) W291 trailing whitespace --- git/test/lib/asserts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git/test/lib/asserts.py') diff --git a/git/test/lib/asserts.py b/git/test/lib/asserts.py index ec3eef96..351901dc 100644 --- a/git/test/lib/asserts.py +++ b/git/test/lib/asserts.py @@ -10,7 +10,7 @@ from nose import tools from nose.tools import * import stat -__all__ = ['assert_instance_of', 'assert_not_instance_of', +__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__ @@ -48,7 +48,7 @@ def assert_not_match(pattern, string, msg=None): def assert_mode_644(mode): """Verify given mode is 644""" - assert (mode & stat.S_IROTH) and (mode & stat.S_IRGRP) + 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) -- cgit v1.2.1