diff options
author | Thomas Waldmann <tw@waldmann-edv.de> | 2015-02-27 16:13:23 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-03-22 14:07:22 +0200 |
commit | 0909a1f59b0aef635ebe4c29e61b7ac887cc8d56 (patch) | |
tree | 5baaa762281dd0341be6891aef687ade13fbafd3 | |
parent | 9abf20baa24c2fac833977251ee29df3ae97dbee (diff) | |
download | obnam-0909a1f59b0aef635ebe4c29e61b7ac887cc8d56.tar.gz |
assertIn and assertNotIn are not available on Python 2.6
-rw-r--r-- | obnamlib/structurederror_tests.py | 4 | ||||
-rw-r--r-- | obnamlib/vfs_local_tests.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/obnamlib/structurederror_tests.py b/obnamlib/structurederror_tests.py index b11909c0..9b24238b 100644 --- a/obnamlib/structurederror_tests.py +++ b/obnamlib/structurederror_tests.py @@ -62,11 +62,11 @@ class StructuredErrorTests(unittest.TestCase): def test_str_returns_first_line_only(self): first = FirstError() - self.assertNotIn('\n', str(first)) + self.assertTrue('\n' not in str(first)) def test_formatted_returns_full_message(self): first = FirstError() - self.assertIn('\n', first.formatted()) + self.assertTrue('\n' in first.formatted()) def test_formatted_message_does_not_end_in_whitespace(self): first = FirstError() diff --git a/obnamlib/vfs_local_tests.py b/obnamlib/vfs_local_tests.py index 950675e4..dd81ac77 100644 --- a/obnamlib/vfs_local_tests.py +++ b/obnamlib/vfs_local_tests.py @@ -50,7 +50,7 @@ class LocalFSTests(obnamlib.VfsTests, unittest.TestCase): def test_get_groupname_returns_root_for_zero(self): # Some Unix systems have a wheel group instead of a root # group. We're fine with either. - self.assertIn(self.fs.get_groupname(0), ['root', 'wheel']) + self.assertTrue(self.fs.get_groupname(0) in ['root', 'wheel']) class XAttrTests(unittest.TestCase): |