[Buildbot-commits] buildbot/buildbot/test test_svnpoller.py, 1.3, 1.4

Brian Warner warner at users.sourceforge.net
Wed Dec 6 08:46:13 UTC 2006


Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22472/buildbot/test

Modified Files:
	test_svnpoller.py 
Log Message:
[project @ rename buildbot.changes.svnpoller.SvnSource to SVNPoller]

Original author: warner at lothar.com
Date: 2006-12-06 08:43:09

Index: test_svnpoller.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_svnpoller.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- test_svnpoller.py	2 Oct 2006 00:13:26 -0000	1.3
+++ test_svnpoller.py	6 Dec 2006 08:46:11 -0000	1.4
@@ -3,7 +3,7 @@
 import time
 from twisted.internet import defer
 from twisted.trial import unittest
-from buildbot.changes.svnpoller import SvnSource
+from buildbot.changes.svnpoller import SVNPoller
 
 # this is the output of "svn info --xml
 # svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk"
@@ -87,7 +87,7 @@
 class ComputePrefix(unittest.TestCase):
     def test1(self):
         base = "svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk"
-        s = SvnSource(base + "/")
+        s = SVNPoller(base + "/")
         self.failUnlessEqual(s.svnurl, base) # certify slash-stripping
         prefix = s.determine_prefix(prefix_output)
         self.failUnlessEqual(prefix, "trunk")
@@ -95,21 +95,21 @@
 
     def test2(self):
         base = "svn+ssh://svn.twistedmatrix.com/svn/Twisted"
-        s = SvnSource(base)
+        s = SVNPoller(base)
         self.failUnlessEqual(s.svnurl, base)
         prefix = s.determine_prefix(prefix_output_2)
         self.failUnlessEqual(prefix, "")
 
     def test3(self):
         base = "file:///home/warner/stuff/Projects/BuildBot/trees/svnpoller/_trial_temp/test_vc/repositories/SVN-Repository"
-        s = SvnSource(base)
+        s = SVNPoller(base)
         self.failUnlessEqual(s.svnurl, base)
         prefix = s.determine_prefix(prefix_output_3)
         self.failUnlessEqual(prefix, "")
 
     def test4(self):
         base = "file:///home/warner/stuff/Projects/BuildBot/trees/svnpoller/_trial_temp/test_vc/repositories/SVN-Repository/sample/trunk"
-        s = SvnSource(base)
+        s = SVNPoller(base)
         self.failUnlessEqual(s.svnurl, base)
         prefix = s.determine_prefix(prefix_output_4)
         self.failUnlessEqual(prefix, "sample/trunk")
@@ -228,9 +228,9 @@
         return None, "/".join(pieces[1:])
     raise RuntimeError("there shouldn't be any files like %s" % path)
 
-class MySvnSource(SvnSource):
+class MySVNPoller(SVNPoller):
     def __init__(self, *args, **kwargs):
-        SvnSource.__init__(self, *args, **kwargs)
+        SVNPoller.__init__(self, *args, **kwargs)
         self.pending_commands = []
         self.finished_changes = []
 
@@ -245,7 +245,7 @@
 class ComputeChanges(unittest.TestCase):
     def test1(self):
         base = "file:///home/warner/stuff/Projects/BuildBot/trees/svnpoller/_trial_temp/test_vc/repositories/SVN-Repository/sample"
-        s = SvnSource(base)
+        s = SVNPoller(base)
         s._prefix = "sample"
         output = make_changes_output(4)
         doc = s.parse_logs(output)
@@ -268,7 +268,7 @@
 
     def testChanges(self):
         base = "file:///home/warner/stuff/Projects/BuildBot/trees/svnpoller/_trial_temp/test_vc/repositories/SVN-Repository/sample"
-        s = SvnSource(base, split_file=split_file)
+        s = SVNPoller(base, split_file=split_file)
         s._prefix = "sample"
         doc = s.parse_logs(make_changes_output(3))
         newlast, logentries = s._filter_new_logentries(doc, 1)
@@ -295,20 +295,20 @@
 
     def testFirstTime(self):
         base = "file:///home/warner/stuff/Projects/BuildBot/trees/svnpoller/_trial_temp/test_vc/repositories/SVN-Repository/sample"
-        s = SvnSource(base, split_file=split_file)
+        s = SVNPoller(base, split_file=split_file)
         s._prefix = "sample"
         doc = s.parse_logs(make_changes_output(4))
         logentries = s.get_new_logentries(doc)
-        # SvnSource ignores all changes that happened before it was started
+        # SVNPoller ignores all changes that happened before it was started
         self.failUnlessEqual(len(logentries), 0)
         self.failUnlessEqual(s.last_change, 4)
 
 class Misc(unittest.TestCase):
     def testAlreadyWorking(self):
         base = "file:///home/warner/stuff/Projects/BuildBot/trees/svnpoller/_trial_temp/test_vc/repositories/SVN-Repository/sample"
-        s = MySvnSource(base)
+        s = MySVNPoller(base)
         d = s.checksvn()
-        # the SvnSource is now waiting for its getProcessOutput to finish
+        # the SVNPoller is now waiting for its getProcessOutput to finish
         self.failUnlessEqual(s.overrun_counter, 0)
         d2 = s.checksvn()
         self.failUnlessEqual(s.overrun_counter, 1)
@@ -316,9 +316,9 @@
 
     def testGetRoot(self):
         base = "svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk"
-        s = MySvnSource(base)
+        s = MySVNPoller(base)
         d = s.checksvn()
-        # the SvnSource is now waiting for its getProcessOutput to finish
+        # the SVNPoller is now waiting for its getProcessOutput to finish
         self.failUnlessEqual(len(s.pending_commands), 1)
         self.failUnlessEqual(s.pending_commands[0][0],
                              ["info", "--xml", "--non-interactive", base])
@@ -331,9 +331,9 @@
 
 class Everything(unittest.TestCase):
     def test1(self):
-        s = MySvnSource(sample_base, split_file=split_file)
+        s = MySVNPoller(sample_base, split_file=split_file)
         d = s.checksvn()
-        # the SvnSource is now waiting for its getProcessOutput to finish
+        # the SVNPoller is now waiting for its getProcessOutput to finish
         self.failUnlessEqual(len(s.pending_commands), 1)
         self.failUnlessEqual(s.pending_commands[0][0],
                              ["info", "--xml", "--non-interactive",





More information about the Commits mailing list