[Python-modules-commits] r14012 - in packages/munkres/trunk/debian (rules test-output)
stefanor-guest at users.alioth.debian.org
stefanor-guest at users.alioth.debian.org
Wed Jul 21 11:32:31 UTC 2010
Date: Wednesday, July 21, 2010 @ 11:32:29
Author: stefanor-guest
Revision: 14012
Trivial test-case
Added:
packages/munkres/trunk/debian/test-output
Modified:
packages/munkres/trunk/debian/rules
Modified: packages/munkres/trunk/debian/rules
===================================================================
--- packages/munkres/trunk/debian/rules 2010-07-21 10:09:09 UTC (rev 14011)
+++ packages/munkres/trunk/debian/rules 2010-07-21 11:32:29 UTC (rev 14012)
@@ -8,9 +8,20 @@
epydoc --html -o debian/html --name=Munkres \
--url=http://bmc.github.com/munkres/ munkres.py
+override_dh_auto_test:
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ mkdir -p test-output
+ set -e; \
+ for ver in $(shell pyversions -vr); do \
+ echo "Testing python$$ver..."; \
+ python$$ver munkres.py > test-output/$$ver; \
+ cmp test-output/$$ver debian/test-output; \
+ done
+endif
+
override_dh_compress:
dh_compress -X.js
override_dh_clean:
dh_clean
- rm -rf debian/html
+ rm -rf debian/html test-output
Added: packages/munkres/trunk/debian/test-output
===================================================================
--- packages/munkres/trunk/debian/test-output (rev 0)
+++ packages/munkres/trunk/debian/test-output 2010-07-21 11:32:29 UTC (rev 14012)
@@ -0,0 +1,32 @@
+cost matrix
+[400, 150, 400]
+[400, 450, 600]
+[300, 225, 300]
+(0, 1) -> 150
+(1, 0) -> 400
+(2, 2) -> 300
+lowest cost=850
+cost matrix
+[400, 150, 400, 1]
+[400, 450, 600, 2]
+[300, 225, 300, 3]
+(0, 1) -> 150
+(1, 3) -> 2
+(2, 2) -> 300
+lowest cost=452
+cost matrix
+[10, 10, 8]
+[ 9, 8, 1]
+[ 9, 7, 4]
+(0, 0) -> 10
+(1, 2) -> 1
+(2, 1) -> 7
+lowest cost=18
+cost matrix
+[10, 10, 8, 11]
+[ 9, 8, 1, 1]
+[ 9, 7, 4, 10]
+(0, 1) -> 10
+(1, 3) -> 1
+(2, 2) -> 4
+lowest cost=15
More information about the Python-modules-commits
mailing list