From ecd252c2d2eefaecdfe7b76c6c0dcadbc232784a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 7 May 2009 09:23:10 -0400 Subject: Add a failing test for running non-.py files on the command line. --- test/farm/run/run_xxx.py | 8 ++++++++ test/farm/run/src/xxx | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/farm/run/run_xxx.py create mode 100644 test/farm/run/src/xxx (limited to 'test/farm/run') diff --git a/test/farm/run/run_xxx.py b/test/farm/run/run_xxx.py new file mode 100644 index 00000000..37a2cb51 --- /dev/null +++ b/test/farm/run/run_xxx.py @@ -0,0 +1,8 @@ +copy("src", "out") +run(""" + coverage -e -x xxx + coverage -r + """, rundir="out", outfile="stdout.txt") +contains("out/stdout.txt", "xxx: 3 4 0 7") +doesnt_contain("out/stdout.txt", "No such file or directory") +clean("out") diff --git a/test/farm/run/src/xxx b/test/farm/run/src/xxx new file mode 100644 index 00000000..6b7eb9e3 --- /dev/null +++ b/test/farm/run/src/xxx @@ -0,0 +1,8 @@ +# This is a python file though it doesn't look like it, like a main script. +a = b = c = d = 0 +a = 3 +b = 4 +if not b: + c = 6 +d = 7 +print "xxx:", a, b, c, d -- cgit v1.2.1