[CMF-checkins] CVS: CMF/CMFStaging/tests -
testReferenceStaging.py:1.2
Sidnei da Silva
sidnei at awkly.org
Mon May 3 11:21:14 EDT 2004
Update of /cvs-repository/CMF/CMFStaging/tests
In directory cvs.zope.org:/tmp/cvs-serv26089/tests
Modified Files:
testReferenceStaging.py
Log Message:
Make it a soft dependency on References.
=== CMF/CMFStaging/tests/testReferenceStaging.py 1.1 => 1.2 ===
--- CMF/CMFStaging/tests/testReferenceStaging.py:1.1 Mon Oct 27 15:21:54 2003
+++ CMF/CMFStaging/tests/testReferenceStaging.py Mon May 3 11:21:03 2004
@@ -21,7 +21,11 @@
import Zope
Zope.startup()
-from Products.References.PathReference import PathReference
+has_refs = 1
+try:
+ from Products.References.PathReference import PathReference
+except ImportError:
+ has_refs = 0
from Products.CMFStaging.tests.testStaging import StagingTests
@@ -46,9 +50,10 @@
def test_suite():
- return unittest.TestSuite((
- unittest.makeSuite(ReferenceStagingTests),
- ))
+ suite = unittest.TestSuite()
+ if has_refs:
+ suite.addTest(unittest.makeSuite(ReferenceStagingTests))
+ return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
More information about the CMF-checkins
mailing list