<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[14349] CalDAVTester/trunk/src</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/14349">14349</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2015-01-27 16:51:37 -0800 (Tue, 27 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>A add bit of py2.6 compatibility.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalDAVTestertrunksrccaldavtestpy">CalDAVTester/trunk/src/caldavtest.py</a></li>
<li><a href="#CalDAVTestertrunksrcmanagerpy">CalDAVTester/trunk/src/manager.py</a></li>
<li><a href="#CalDAVTestertrunksrcobserverslogpy">CalDAVTester/trunk/src/observers/log.py</a></li>
<li><a href="#CalDAVTestertrunksrcserverinfopy">CalDAVTester/trunk/src/serverinfo.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalDAVTestertrunksrccaldavtestpy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/src/caldavtest.py (14348 => 14349)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/src/caldavtest.py        2015-01-27 18:39:08 UTC (rev 14348)
+++ CalDAVTester/trunk/src/caldavtest.py        2015-01-28 00:51:37 UTC (rev 14349)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">         # Always need a new set of UIDs for the entire test
</span><span class="cx">         uids = self.manager.server_info.newUIDs()
</span><span class="cx">         for uid, uidname in uids:
</span><del>-            self.uidmaps[uid] = &quot;{} - {}&quot;.format(uidname, self.name)
</del><ins>+            self.uidmaps[uid] = &quot;{u} - {n}&quot;.format(u=uidname, n=self.name)
</ins><span class="cx"> 
</span><span class="cx">         self.only = any([suite.only for suite in self.suites])
</span><span class="cx">         try:
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx">             testsuite = self.manager.testSuite(testfile, result_name, &quot;&quot;)
</span><span class="cx">             uids = suite.aboutToRun()
</span><span class="cx">             for uid, uidname in uids:
</span><del>-                self.uidmaps[uid] = &quot;{} - {}&quot;.format(uidname, label)
</del><ins>+                self.uidmaps[uid] = &quot;{u} - {l}&quot;.format(u=uidname, l=label)
</ins><span class="cx">             for test in suite.tests:
</span><span class="cx">                 result = self.run_test(testsuite, test, etags, only_tests, label=&quot;%s | %s&quot; % (label, test.name))
</span><span class="cx">                 if result == &quot;t&quot;:
</span><span class="lines">@@ -470,7 +470,7 @@
</span><span class="cx">                         test = self.uidmaps.get(uid, &quot;unknown&quot;)
</span><span class="cx">                     else:
</span><span class="cx">                         test = &quot;unknown&quot;
</span><del>-                rdata += &quot;\n\nhref: {}\ntest: {}\n\n{}\n&quot;.format(href, test, respdata)
</del><ins>+                rdata += &quot;\n\nhref: {h}\ntest: {t}\n\n{r}\n&quot;.format(h=href, t=test, r=respdata)
</ins><span class="cx"> 
</span><span class="cx">             return False, rdata
</span><span class="cx">         else:
</span><span class="lines">@@ -546,7 +546,7 @@
</span><span class="cx">                 collection = (ruri, req.user, req.pswd)
</span><span class="cx">                 hrefs = self.dofindall(collection, label=&quot;%s | %s&quot; % (label, &quot;DELETEALL&quot;))
</span><span class="cx">                 if not self.dodeleteall(hrefs, label=&quot;%s | %s&quot; % (label, &quot;DELETEALL&quot;)):
</span><del>-                    return False, &quot;DELETEALL failed for: {}&quot;.format(ruri), None, None
</del><ins>+                    return False, &quot;DELETEALL failed for: {r}&quot;.format(r=ruri), None, None
</ins><span class="cx">             return True, &quot;&quot;, None, None
</span><span class="cx"> 
</span><span class="cx">         # Special for delay
</span><span class="lines">@@ -591,7 +591,7 @@
</span><span class="cx">                 collection = (ruri, req.user, req.pswd)
</span><span class="cx">                 waitresult, waitdetails = self.dowaitcount(collection, count, label=label)
</span><span class="cx">                 if not waitresult:
</span><del>-                    return False, &quot;Count did not change: {}&quot;.format(waitdetails), None, None
</del><ins>+                    return False, &quot;Count did not change: {w}&quot;.format(w=waitdetails), None, None
</ins><span class="cx">             else:
</span><span class="cx">                 return True, &quot;&quot;, None, None
</span><span class="cx"> 
</span><span class="lines">@@ -605,7 +605,7 @@
</span><span class="cx">                     hrefs = self.dofindall(collection, label=&quot;%s | %s&quot; % (label, &quot;DELETEALL&quot;))
</span><span class="cx">                     self.dodeleteall(hrefs, label=&quot;%s | %s&quot; % (label, &quot;DELETEALL&quot;))
</span><span class="cx">                 else:
</span><del>-                    return False, &quot;Count did not change: {}&quot;.format(waitdetails), None, None
</del><ins>+                    return False, &quot;Count did not change: {w}&quot;.format(w=waitdetails), None, None
</ins><span class="cx">             else:
</span><span class="cx">                 return True, &quot;&quot;, None, None
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalDAVTestertrunksrcmanagerpy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/src/manager.py (14348 => 14349)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/src/manager.py        2015-01-27 18:39:08 UTC (rev 14348)
+++ CalDAVTester/trunk/src/manager.py        2015-01-28 00:51:37 UTC (rev 14349)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx"> 
</span><span class="cx">     def readXML(self, serverfile, testfiles, ssl, all, moresubs={}):
</span><span class="cx"> 
</span><del>-        self.message(&quot;trace&quot;, &quot;Reading Server Info from \&quot;{}\&quot;&quot;.format(serverfile))
</del><ins>+        self.message(&quot;trace&quot;, &quot;Reading Server Info from \&quot;{s}\&quot;&quot;.format(s=serverfile))
</ins><span class="cx"> 
</span><span class="cx">         # Open and parse the server config file
</span><span class="cx">         try:
</span><span class="lines">@@ -176,14 +176,14 @@
</span><span class="cx">             caldavtest_node = tree.getroot()
</span><span class="cx">             if caldavtest_node.tag != src.xmlDefs.ELEMENT_CALDAVTEST:
</span><span class="cx">                 if ignore_root:
</span><del>-                    self.message(&quot;trace&quot;, &quot;Ignoring file \&quot;{}\&quot; because it is not a test file&quot;.format(fname))
</del><ins>+                    self.message(&quot;trace&quot;, &quot;Ignoring file \&quot;{f}\&quot; because it is not a test file&quot;.format(f=fname))
</ins><span class="cx">                     return None
</span><span class="cx">                 else:
</span><span class="cx">                     raise EX_INVALID_CONFIG_FILE
</span><span class="cx">             if not len(caldavtest_node):
</span><span class="cx">                 raise EX_INVALID_CONFIG_FILE
</span><span class="cx"> 
</span><del>-            self.message(&quot;Reading Test Details from \&quot;{}\&quot;&quot;.format(fname))
</del><ins>+            self.message(&quot;Reading Test Details from \&quot;{f}\&quot;&quot;.format(f=fname))
</ins><span class="cx">             test = caldavtest(self, fname)
</span><span class="cx">             test.parseXML(caldavtest_node)
</span><span class="cx">             return test
</span></span></pre></div>
<a id="CalDAVTestertrunksrcobserverslogpy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/src/observers/log.py (14348 => 14349)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/src/observers/log.py        2015-01-27 18:39:08 UTC (rev 14348)
+++ CalDAVTester/trunk/src/observers/log.py        2015-01-28 00:51:37 UTC (rev 14349)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     def start(self):
</span><span class="cx">         self.manager.logit(&quot;Starting tests&quot;)
</span><span class="cx">         if self.manager.randomSeed is not None:
</span><del>-            self.manager.logit(&quot;Randomizing order using seed '{}'&quot;.format(self.manager.randomSeed))
</del><ins>+            self.manager.logit(&quot;Randomizing order using seed '{rs}'&quot;.format(rs=self.manager.randomSeed))
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def testFile(self, result):
</span><span class="lines">@@ -112,16 +112,16 @@
</span><span class="cx">             for failed in self.loggedFailures:
</span><span class="cx">                 self.manager.logit(&quot;=&quot; * 70)
</span><span class="cx">                 self.manager.logit(failed)
</span><del>-            overall = &quot;FAILED (ok={}, ignored={}, failed={}, errors={})&quot;.format(
-                self.manager.totals[manager.RESULT_OK],
-                self.manager.totals[manager.RESULT_IGNORED],
-                self.manager.totals[manager.RESULT_FAILED],
-                self.manager.totals[manager.RESULT_ERROR],
</del><ins>+            overall = &quot;FAILED (ok={o}, ignored={i}, failed={f}, errors={e})&quot;.format(
+                o=self.manager.totals[manager.RESULT_OK],
+                i=self.manager.totals[manager.RESULT_IGNORED],
+                f=self.manager.totals[manager.RESULT_FAILED],
+                e=self.manager.totals[manager.RESULT_ERROR],
</ins><span class="cx">             )
</span><span class="cx">         else:
</span><del>-            overall = &quot;PASSED (ok={}, ignored={})&quot;.format(
-                self.manager.totals[manager.RESULT_OK],
-                self.manager.totals[manager.RESULT_IGNORED],
</del><ins>+            overall = &quot;PASSED (ok={o}, ignored={i})&quot;.format(
+                o=self.manager.totals[manager.RESULT_OK],
+                i=self.manager.totals[manager.RESULT_IGNORED],
</ins><span class="cx">             )
</span><span class="cx">         self.manager.logit(&quot;-&quot; * 70)
</span><span class="cx">         self.manager.logit(&quot;Ran {total} tests in {time:.3f}s\n&quot;.format(
</span></span></pre></div>
<a id="CalDAVTestertrunksrcserverinfopy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/src/serverinfo.py (14348 => 14349)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/src/serverinfo.py        2015-01-27 18:39:08 UTC (rev 14348)
+++ CalDAVTester/trunk/src/serverinfo.py        2015-01-28 00:51:37 UTC (rev 14349)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def newUIDs(self):
</span><del>-        uidsubs = dict([(&quot;$uid{}:&quot;.format(i), str(uuid4())) for i in range(1, 21)])
</del><ins>+        uidsubs = dict([(&quot;$uid{u}:&quot;.format(u=i), str(uuid4())) for i in range(1, 21)])
</ins><span class="cx">         self.subsdict.update(uidsubs)
</span><span class="cx">         self.extrasubsdict.update(uidsubs)
</span><span class="cx">         return set([(v, k) for k, v in uidsubs.items()])
</span></span></pre>
</div>
</div>

</body>
</html>