[PATCH 2/2] tests: Don't use assertIsNone

Mathieu Bridon bochecha at fedoraproject.org
Thu Apr 16 08:38:18 UTC 2015


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')
-- 
2.1.0



More information about the buildsys mailing list