[Python-modules-commits] r21241 - in packages/gamera/trunk/debian (5 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Mon Apr 16 17:48:38 UTC 2012


    Date: Monday, April 16, 2012 @ 17:48:36
  Author: jwilk
Revision: 21241

Port the test suite to nose.

Added:
  packages/gamera/trunk/debian/patches/nosetests.diff
Modified:
  packages/gamera/trunk/debian/changelog
  packages/gamera/trunk/debian/control
  packages/gamera/trunk/debian/patches/series
  packages/gamera/trunk/debian/run-tests.py

Modified: packages/gamera/trunk/debian/changelog
===================================================================
--- packages/gamera/trunk/debian/changelog	2012-04-16 12:21:18 UTC (rev 21240)
+++ packages/gamera/trunk/debian/changelog	2012-04-16 17:48:36 UTC (rev 21241)
@@ -6,8 +6,13 @@
     + Update debian/copyright URI.
   * Build-depend on libpng-dev instead of libpng12-dev (closes: #662340).
     Thanks to Nobuhiro Iwamatsu for the bug report.
+  * Port the test suite to nose (closes: #664670).
+    + Add patch to fix some incompatibilities.
+      (nosetests.diff)
+    + Build-depend on python-nose instead of python-py.
+    + Update the patch running script.
 
- -- Jakub Wilk <jwilk at debian.org>  Mon, 05 Mar 2012 20:25:30 +0100
+ -- Jakub Wilk <jwilk at debian.org>  Mon, 16 Apr 2012 19:12:02 +0200
 
 gamera (3.3.2-2) unstable; urgency=low
 

Modified: packages/gamera/trunk/debian/control
===================================================================
--- packages/gamera/trunk/debian/control	2012-04-16 12:21:18 UTC (rev 21240)
+++ packages/gamera/trunk/debian/control	2012-04-16 17:48:36 UTC (rev 21241)
@@ -7,7 +7,8 @@
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/gamera/trunk/
 Build-Depends: debhelper (>= 7.3.5~), dpkg-dev (>= 1.15.7~),
  python-support (>= 0.90), python-all-dev, python-all-dbg,
- python-py, python-imaging, python-imaging-dbg, python-docutils, python-pygments,
+ python-nose,
+ python-imaging, python-imaging-dbg, python-docutils, python-pygments,
  libtiff4-dev, libpng-dev,
  libvigraimpex-dev (>= 1.6.0-1~),
  libga-dev

Added: packages/gamera/trunk/debian/patches/nosetests.diff
===================================================================
--- packages/gamera/trunk/debian/patches/nosetests.diff	                        (rev 0)
+++ packages/gamera/trunk/debian/patches/nosetests.diff	2012-04-16 17:48:36 UTC (rev 21241)
@@ -0,0 +1,71 @@
+Description: port the test suite to nose
+Author: Jakub Wilk <jwilk at debian.org>
+Bug-Debian: http://bugs.debian.org/664670
+Forwarded: not-needed
+Last-Update: 2012-04-16
+
+--- a/tests/test_graph.py
++++ b/tests/test_graph.py
+@@ -1082,7 +1082,9 @@
+ #small tests
+ for test in tests_small:
+    for flag in flags:
+-      setattr(TestGraph, "test_small_%d_%s" % (flag, test.__name__ ), _make_test(test,flag))
++      f = _make_test(test,flag)
++      f.__name__ = "test_small_%d_%s" % (flag, test.__name__)
++      setattr(TestGraph, f.__name__, f)
+ 
+ #large default
+ #for test in tests_large:
+@@ -1093,10 +1095,10 @@
+ for size in [512]:
+    for test in tests_large:
+       for flag in flags:
+-         setattr(TestGraph, "test_large_%d_%d_%s" % (flag, size, test.__name__ ), 
+-                 _make_test_size(test, flag, size))
+-   
+-
++         f = _make_test_size(test, flag, size)
++         f.__name__ = "test_large_%d_%d_%s" % (flag, size, test.__name__)
++         setattr(TestGraph, f.__name__, f)
++del f, test
+ 
+ 
+ 
+--- a/tests/test_plugins.py
++++ b/tests/test_plugins.py
+@@ -22,4 +22,9 @@
+ 
+ tester = PluginTester()
+ for name, method in tester.methods:
+-   setattr(TestPlugins, "test_plugin_" + name, make_test(tester, method))
++   f = make_test(tester, method)
++   f.__name__ = "test_plugin_" + name
++   setattr(TestPlugins, f.__name__, f)
++del f
++
++del make_test
+--- a/tests/test_image.py
++++ b/tests/test_image.py
+@@ -20,6 +20,7 @@
+                           (GREY16, xrange((2 ** 16) - 1))]:
+          inner(type, value, DENSE)
+       inner(ONEBIT, xrange(0, 2 ** 16 - 1), RLE)
++   test.__name__ = inner.__name__.lstrip('_')
+    return test
+ 
+ def _test_image_constructors(type, value, storage):
+@@ -150,3 +151,5 @@
+     assert tmp.get((0,0)) == 0
+     assert tmp.get((5,5)) == 85
+     assert tmp.get((9,9)) == 255
++
++del make_test
+--- /dev/null
++++ b/tests/py/test.py
+@@ -0,0 +1 @@
++from nose.tools import assert_raises as raises
+--- /dev/null
++++ b/tests/py/__init__.py
+@@ -0,0 +1 @@
++#

Modified: packages/gamera/trunk/debian/patches/series
===================================================================
--- packages/gamera/trunk/debian/patches/series	2012-04-16 12:21:18 UTC (rev 21240)
+++ packages/gamera/trunk/debian/patches/series	2012-04-16 17:48:36 UTC (rev 21241)
@@ -7,3 +7,4 @@
 setup-no-import-wx.diff
 namespace-package.diff
 graphmodule-fix-type-mismatch.diff
+nosetests.diff

Modified: packages/gamera/trunk/debian/run-tests.py
===================================================================
--- packages/gamera/trunk/debian/run-tests.py	2012-04-16 12:21:18 UTC (rev 21240)
+++ packages/gamera/trunk/debian/run-tests.py	2012-04-16 17:48:36 UTC (rev 21241)
@@ -4,4 +4,4 @@
 os.chdir(os.path.join(os.path.dirname(__file__), '..', 'tests'))
 gamera.paths.test = os.path.join('..', 'gamera', 'test')
 
-execfile('/usr/bin/py.test')
+execfile('/usr/bin/nosetests')




More information about the Python-modules-commits mailing list