commit:     6236bd0dbeb638c0c67c3e32a247eb55b000e3b8
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 06:20:17 2014 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 06:20:17 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=6236bd0d

external.py: Modifies XML line testing in MakeOverlayXML class

To make this testing more compliant with both py2.7 and py3.x the
method in which the test suit tested the lines in the made XML
needed to be changed as py2.7 adds the XML header when reading in
the XML test file.

---
 layman/tests/external.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layman/tests/external.py b/layman/tests/external.py
index 695decc..ad630e6 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -444,7 +444,7 @@ class MakeOverlayXML(unittest.TestCase):
         with fileopen(path, 'r') as xml:
             test_line = '    <source type="svn">'\
                         'https://overlays.gentoo.org/svn/dev/wrobel</source>\n'
-            self.assertEqual(xml.readlines()[9], test_line)
+            self.assertTrue(test_line in xml.readlines())
             for line in xml.readlines():
                 print(line, end='')
 

Reply via email to