def test_parseBrokenSVNEntries(self):
     """
     If there is a broken SVN entries file, it should return an SVN
     revision of "Unknown".
     """
     version = Version("dummy", 1, 0, 0)
     self.assertEquals(version._parseSVNEntries(StringIO('I like puppies')), 
                       "Unknown")
Esempio n. 2
0
 def test_parseBrokenSVNEntries(self):
     """
     If there is a broken SVN entries file, it should return an SVN
     revision of "Unknown".
     """
     version = Version("dummy", 1, 0, 0)
     self.assertEquals(version._parseSVNEntries(StringIO('I like puppies')),
                       "Unknown")
    def test_goodSVNEntries(self):
        """
        Version should be able to parse an SVN entries file.
        """
        version = Version("dummy", 1, 0, 0)
        crap = '''<?xml version="1.0" encoding="utf-8"?>
<wc-entries
   xmlns="svn:">
<entry
   committed-rev="18210"
   name=""
   committed-date="2006-09-21T04:43:09.542953Z"
   url="svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk/twisted"
   last-author="exarkun"
   kind="dir"
   uuid="bbbe8e31-12d6-0310-92fd-ac37d47ddeeb"
   repos="svn+ssh://svn.twistedmatrix.com/svn/Twisted"
   revision="18211"/>
</wc-entries>
'''
        self.assertEquals(version._parseSVNEntries(StringIO(crap)), '18211')
Esempio n. 4
0
    def test_goodSVNEntries(self):
        """
        Version should be able to parse an SVN entries file.
        """
        version = Version("dummy", 1, 0, 0)
        crap = '''<?xml version="1.0" encoding="utf-8"?>
<wc-entries
   xmlns="svn:">
<entry
   committed-rev="18210"
   name=""
   committed-date="2006-09-21T04:43:09.542953Z"
   url="svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk/twisted"
   last-author="exarkun"
   kind="dir"
   uuid="bbbe8e31-12d6-0310-92fd-ac37d47ddeeb"
   repos="svn+ssh://svn.twistedmatrix.com/svn/Twisted"
   revision="18211"/>
</wc-entries>
'''
        self.assertEquals(version._parseSVNEntries(StringIO(crap)), '18211')