Code review comment for lp:~mandel/ubuntuone-client/add-method-name

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

* You're adding a lot of duplication for the tests. What about creating a new assert method and reuse that in every test?

def assert_error_raised(self, path, method_name=None):

     if method_name is None:
         self.assertRaises(AssertionError, assert_windows_path, path)
     else:
         exc = self.assertRaises(AssertionError, assert_windows_path, path,
                                 method_name)
         self.assertTrue(method_name in exc.message)

* There are lint issues:

== Python Lint Notices ==

./tests/platform/windows/test_os_helper.py:
    321: redefinition of function 'test_assert_windows_path_with_illegal_chars' from line 316

review: Needs Fixing

« Back to merge proposal