[med-svn] [python-ruffus] 01/03: There is one remaining failed test which was replaced by the version from upstream Git
Andreas Tille
tille at debian.org
Tue Mar 17 21:14:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository python-ruffus.
commit 6014b7326bba5fd5260829d561cfbf6364f4551a
Author: Andreas Tille <tille at debian.org>
Date: Tue Mar 17 17:21:16 2015 +0100
There is one remaining failed test which was replaced by the version from upstream Git
---
debian/patches/fix_test.patch | 164 ++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/tests/run-unit-test | 8 +--
3 files changed, 169 insertions(+), 4 deletions(-)
diff --git a/debian/patches/fix_test.patch b/debian/patches/fix_test.patch
new file mode 100644
index 0000000..2ab71d7
--- /dev/null
+++ b/debian/patches/fix_test.patch
@@ -0,0 +1,164 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Fri, 13 Mar 2015 11:00:09 +0100
+Description: replace failed test from upstream Git where it is fixed
+
+--- a/ruffus/test/test_file_name_parameters.py
++++ b/ruffus/test/test_file_name_parameters.py
+@@ -417,6 +417,9 @@ class Test_split_param_factory(unittest.
+ time.sleep(0.1)
+ touch("%s/f%d.output" % (test_path, 1))
+ touch("%s/f%d.output" % (test_path, 2))
++ for ii in range(3):
++ touch("%s/%d.test_match1" % (test_path, ii))
++ touch("%s/%d.test_match2" % (test_path, ii))
+
+ self.tasks = [t1, t2, t3, t4, t5]
+
+@@ -424,6 +427,8 @@ class Test_split_param_factory(unittest.
+ def tearDown(self):
+ for i in range(3):
+ os.unlink("%s/f%d.test" % (test_path, i))
++ os.unlink("%s/%d.test_match1" % (test_path, i))
++ os.unlink("%s/%d.test_match2" % (test_path, i))
+ for i in range(3):
+ os.unlink("%s/f%d.output" % (test_path, i))
+ os.removedirs(test_path)
+@@ -466,20 +471,31 @@ class Test_split_param_factory(unittest.
+ #
+ # simple 1 input, 1 output
+ #
+- paths = self.do_task_split(test_path + "/*", [exe_path + "/a*.py", exe_path + "/r*.py"])
++ paths = self.do_task_split(test_path + "/*", [test_path + "/*.test_match1", test_path + "/*.test_match2"])
+ self.assertEqual(recursive_replace(recursive_replace(paths, test_path, "DIR"), exe_path, "DIR"),
+- ( ['DIR/f0.output',
+- 'DIR/f0.test',
+- 'DIR/f1.output',
+- 'DIR/f1.test',
+- 'DIR/f2.output',
+- 'DIR/f2.test',
+- ],
+- ['DIR/adjacent_pairs_iterate.py',
+- 'DIR/ruffus_exceptions.py',
+- 'DIR/ruffus_utility.py',
+- 'DIR/ruffus_version.py'
+- ] ))
++ ( ['DIR/0.test_match1',
++ 'DIR/0.test_match2',
++ 'DIR/1.test_match1',
++ 'DIR/1.test_match2',
++ 'DIR/2.test_match1',
++ 'DIR/2.test_match2',
++ 'DIR/f0.output',
++ 'DIR/f0.test',
++ 'DIR/f1.output',
++ 'DIR/f1.test',
++ 'DIR/f2.output',
++ 'DIR/f2.test'],
++ ['DIR/0.test_match1',
++ 'DIR/1.test_match1',
++ 'DIR/2.test_match1',
++ 'DIR/0.test_match2',
++ 'DIR/1.test_match2',
++ 'DIR/2.test_match2'] ))
++
++
++
++
++
+ def test_tasks(self):
+ """
+ test if can use tasks to specify dependencies
+@@ -491,51 +507,58 @@ class Test_split_param_factory(unittest.
+ "module.func4",
+ "module.func5"),
+ test_path + "/*"],
+- [exe_path + "/a*.py", # output params
+- exe_path + "/r*.py",
++ [test_path + "/*.test_match1", # output params
++ test_path + "/*.test_match2",
+ "extra.file"],
+ 6) # extra params
+ paths = recursive_replace(recursive_replace(paths, test_path, "DIR"), exe_path, "DIR")
+ self.assertEqual(paths,
+- ([
+- 5,
+- ['output4.test', 'output.ignored'],
+- 'output1.test',
+- 'output2.test',
+- 'output3.test',
+- 'output.ignored',
+- (2, 'output5.test'),
+- 'DIR/f0.output',
+- 'DIR/f0.test',
+- 'DIR/f1.output',
+- 'DIR/f1.test',
+- 'DIR/f2.output',
+- 'DIR/f2.test'],
+- ['DIR/adjacent_pairs_iterate.py',
+- 'DIR/ruffus_exceptions.py',
+- 'DIR/ruffus_utility.py',
+- 'DIR/ruffus_version.py',
+- 'extra.file'],
+- 6))
++ ([ 5,
++ ['output4.test', 'output.ignored'],
++ 'output1.test',
++ 'output2.test',
++ 'output3.test',
++ 'output.ignored',
++ (2, 'output5.test'),
++ 'DIR/0.test_match1',
++ 'DIR/0.test_match2',
++ 'DIR/1.test_match1',
++ 'DIR/1.test_match2',
++ 'DIR/2.test_match1',
++ 'DIR/2.test_match2',
++ 'DIR/f0.output',
++ 'DIR/f0.test',
++ 'DIR/f1.output',
++ 'DIR/f1.test',
++ 'DIR/f2.output',
++ 'DIR/f2.test'],
++ ['DIR/0.test_match1',
++ 'DIR/1.test_match1',
++ 'DIR/2.test_match1',
++ 'DIR/0.test_match2',
++ 'DIR/1.test_match2',
++ 'DIR/2.test_match2',
++ 'extra.file'],
++ 6))
+
+
+ # single job output consisting of a single file
+- paths = self.do_task_split(task.output_from("module.func2"), exe_path + "/a*.py")
++ paths = self.do_task_split(task.output_from("module.func2"), test_path + "/*.test_match1")
+ paths = recursive_replace(recursive_replace(paths, test_path, "DIR"), exe_path, "DIR_E")
+- self.assertEqual(paths, ('output.ignored', ['DIR_E/adjacent_pairs_iterate.py']))
++ self.assertEqual(paths, ('output.ignored', ['DIR/0.test_match1', 'DIR/1.test_match1', 'DIR/2.test_match1']))
+
+- paths = self.do_task_split([task.output_from("module.func2")], exe_path + "/a*.py")
++ paths = self.do_task_split([task.output_from("module.func2")], test_path + "/*.test_match1")
+ paths = recursive_replace(recursive_replace(paths, test_path, "DIR"), exe_path, "DIR_E")
+- self.assertEqual(paths, (['output.ignored'], ['DIR_E/adjacent_pairs_iterate.py']))
++ self.assertEqual(paths, (['output.ignored'], ['DIR/0.test_match1', 'DIR/1.test_match1', 'DIR/2.test_match1']))
+
+ # single job output consisting of a list
+- paths = self.do_task_split(task.output_from("module.func4"), exe_path + "/a*.py")
++ paths = self.do_task_split(task.output_from("module.func4"), test_path + "/*.test_match1")
+ paths = recursive_replace(recursive_replace(paths, test_path, "DIR"), exe_path, "DIR_E")
+- self.assertEqual(paths, ((2, 'output5.test'), ['DIR_E/adjacent_pairs_iterate.py']) )
++ self.assertEqual(paths, ((2, 'output5.test'), ['DIR/0.test_match1', 'DIR/1.test_match1', 'DIR/2.test_match1']) )
+
+- paths = self.do_task_split([task.output_from("module.func4")], exe_path + "/a*.py")
++ paths = self.do_task_split([task.output_from("module.func4")], test_path + "/*.test_match1")
+ paths = recursive_replace(recursive_replace(paths, test_path, "DIR"), exe_path, "DIR_E")
+- self.assertEqual(paths, ([(2, 'output5.test')], ['DIR_E/adjacent_pairs_iterate.py']))
++ self.assertEqual(paths, ([(2, 'output5.test')], ['DIR/0.test_match1', 'DIR/1.test_match1', 'DIR/2.test_match1']))
+
+ #=========================================================================================
+
+@@ -1597,3 +1620,4 @@ class Test_product_param_factory(unittes
+
+ if __name__ == '__main__':
+ unittest.main()
++
diff --git a/debian/patches/series b/debian/patches/series
index 7fbc074..0198241 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
run_test_executable.patch
+fix_test.patch
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
index 87538e1..7470aa8 100644
--- a/debian/tests/run-unit-test
+++ b/debian/tests/run-unit-test
@@ -14,10 +14,10 @@ find . -type f -name "*.gz" -exec gunzip \{\} \;
export LC_ALL=C.UTF-8
for testscript in run_all_unit_tests*.cmd ; do
- # exclude tests with known issues
- sed -i -e 's/\(unittest test_file_name_parameters.*\)\\/\1 true/' \
- -e 's/\(unittest test_ruffus_utility.*\)\\/\1 true/' \
- $testscript
+ # exclude tests with known issues ... should not be needed any more since fix_test.patch
+# sed -i -e 's/\(unittest test_file_name_parameters.*\)\\/\1 true/' \
+# -e 's/\(unittest test_ruffus_utility.*\)\\/\1 true/' \
+# $testscript
sh $testscript
done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-ruffus.git
More information about the debian-med-commit
mailing list