[CalendarServer-changes] [5716] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jun 10 09:42:29 PDT 2010
Revision: 5716
http://trac.macosforge.org/projects/calendarserver/changeset/5716
Author: sagen at apple.com
Date: 2010-06-10 09:42:26 -0700 (Thu, 10 Jun 2010)
Log Message:
-----------
Adds support for specifying optional files when verifying a file hierarchy within unit tests. Specifically, the sqlite we use in Leopard doesn't keep -journal files around.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/test/test_purge.py
CalendarServer/trunk/twistedcaldav/test/util.py
Modified: CalendarServer/trunk/calendarserver/tools/test/test_purge.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_purge.py 2010-06-10 15:53:42 UTC (rev 5715)
+++ CalendarServer/trunk/calendarserver/tools/test/test_purge.py 2010-06-10 16:42:26 UTC (rev 5716)
@@ -100,6 +100,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"endless.ics": {
@@ -532,6 +533,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"noninvite.ics": {
@@ -549,6 +551,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"*.ics/UID:7ED97931-9A19-4596-9D4D-52B36D6AB803": {
@@ -568,6 +571,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"organizer.ics": {
@@ -670,6 +674,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"noninvite_past.ics": {
@@ -687,6 +692,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"*.ics/UID:7ED97931-9A19-4596-9D4D-52B36D6AB803": {
@@ -711,6 +717,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"organizer.ics": {
@@ -833,6 +840,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"noninvite.ics": { # event in the past
@@ -871,6 +879,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"*.ics/UID:7ED97931-9A19-4596-9D4D-52B36D6AB803": {
@@ -890,6 +899,7 @@
"@contents" : None, # ignore contents
},
".db.sqlite-journal": {
+ "@optional" : None, # not in old sqlite
"@contents" : None, # ignore contents
},
"organizer.ics": {
Modified: CalendarServer/trunk/twistedcaldav/test/util.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/util.py 2010-06-10 15:53:42 UTC (rev 5715)
+++ CalendarServer/trunk/twistedcaldav/test/util.py 2010-06-10 16:42:26 UTC (rev 5716)
@@ -150,7 +150,8 @@
childPath = os.path.join(parent, childName)
- if not os.path.exists(childPath):
+ if (not os.path.exists(childPath) and
+ not childStructure.has_key("@optional")):
print "Missing:", childPath
return False
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100610/c9521b5f/attachment-0001.html>
More information about the calendarserver-changes
mailing list