[PATCH 2/2] tests: Don't use assertIsNone
Pavol Babincak
pbabinca at redhat.com
Thu Apr 16 08:53:46 UTC 2015
Thanks. Both patches applied. It is part of new release - rpkg-1.33 now.
On 04/16/2015 10:38 AM, Mathieu Bridon wrote:
> From: Mathieu Bridon <bochecha at daitauha.fr>
>
> assertIsNone was introduced with Python >= 2.7, but we still have 2.6
> on EL6.
> ---
> test/test_sources.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/test_sources.py b/test/test_sources.py
> index 9464325..11561ad 100644
> --- a/test/test_sources.py
> +++ b/test/test_sources.py
> @@ -34,17 +34,17 @@ class SourcesFileTestCase(unittest.TestCase):
> def test_parse_empty_line(self):
> s = sources.SourcesFile(self.sourcesfile, 'bsd')
> entry = s.parse_line('')
> - self.assertIsNone(entry)
> + self.assertTrue(entry is None)
>
> def test_parse_eol_line(self):
> s = sources.SourcesFile(self.sourcesfile, 'bsd')
> entry = s.parse_line('\n')
> - self.assertIsNone(entry)
> + self.assertTrue(entry is None)
>
> def test_parse_whitespace_line(self):
> s = sources.SourcesFile(self.sourcesfile, 'bsd')
> entry = s.parse_line(' \n')
> - self.assertIsNone(entry)
> + self.assertTrue(entry is None)
>
> def test_parse_old_style_line(self):
> s = sources.SourcesFile(self.sourcesfile, 'old')
>
--
Pavol Babincak
Release Engineering, Red Hat
More information about the buildsys
mailing list