[csw-devel] SF.net SVN: gar:[14919] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue Jun 28 11:23:38 CEST 2011
Revision: 14919
http://gar.svn.sourceforge.net/gar/?rev=14919&view=rev
Author: wahwah
Date: 2011-06-28 09:23:38 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
pkgdb: Fall back to unittest if necessary
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/checkpkg_lib_test.py
csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py
Modified: csw/mgar/gar/v2/lib/python/checkpkg_lib_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_lib_test.py 2011-06-27 20:42:45 UTC (rev 14918)
+++ csw/mgar/gar/v2/lib/python/checkpkg_lib_test.py 2011-06-28 09:23:38 UTC (rev 14919)
@@ -1,6 +1,11 @@
#!/usr/bin/env python2.6
-import unittest2 as unittest
+# Try to use unittest2, fall back to unittest
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
import checkpkg_lib
import copy
import cPickle
Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py 2011-06-27 20:42:45 UTC (rev 14918)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py 2011-06-28 09:23:38 UTC (rev 14919)
@@ -1,6 +1,11 @@
#!/usr/bin/env python2.6
-import unittest2 as unittest
+# Try to use unittest2, fall back to unittest
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
import csw_upload_pkg
import mox
import rest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list