summaryrefslogtreecommitdiff
path: root/test/farm
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-04-18 21:15:06 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-04-18 21:15:06 -0400
commite2cfffb9b613f8eb68e27497ad37010a092db31b (patch)
tree6247c4b8dfa2a3ebbf1b112b85b165df94b8ccbf /test/farm
parent75d841ad0e1ecef284817bfbe1b3ab9a8e9fdfa4 (diff)
downloadpython-coveragepy-e2cfffb9b613f8eb68e27497ad37010a092db31b.tar.gz
More annotate tests, but something is amiss.
Diffstat (limited to 'test/farm')
-rw-r--r--test/farm/annotate/annotate_dir.py8
-rw-r--r--test/farm/annotate/gold_anno_dir/a.py,cover5
-rw-r--r--test/farm/annotate/gold_anno_dir/b.py,cover2
-rw-r--r--test/farm/annotate/gold_anno_dir/multi.py,cover5
4 files changed, 20 insertions, 0 deletions
diff --git a/test/farm/annotate/annotate_dir.py b/test/farm/annotate/annotate_dir.py
new file mode 100644
index 0000000..23dfff3
--- /dev/null
+++ b/test/farm/annotate/annotate_dir.py
@@ -0,0 +1,8 @@
+copy("src", "run")
+run("""
+ coverage -x multi.py
+ coverage -a -d out_anno_dir
+ """, rundir="run")
+compare("run/out_anno_dir", "gold_anno_dir", "*,cover", left_extra=True)
+clean("out_anno_dir")
+clean("run")
diff --git a/test/farm/annotate/gold_anno_dir/a.py,cover b/test/farm/annotate/gold_anno_dir/a.py,cover
new file mode 100644
index 0000000..0c858f4
--- /dev/null
+++ b/test/farm/annotate/gold_anno_dir/a.py,cover
@@ -0,0 +1,5 @@
+> def a(x):
+> if x == 1:
+> print "x is 1"
+! else:
+! print "x is not 1"
diff --git a/test/farm/annotate/gold_anno_dir/b.py,cover b/test/farm/annotate/gold_anno_dir/b.py,cover
new file mode 100644
index 0000000..0bd04da
--- /dev/null
+++ b/test/farm/annotate/gold_anno_dir/b.py,cover
@@ -0,0 +1,2 @@
+> def b(x):
+> print "x is %s" % x
diff --git a/test/farm/annotate/gold_anno_dir/multi.py,cover b/test/farm/annotate/gold_anno_dir/multi.py,cover
new file mode 100644
index 0000000..fc5b0b7
--- /dev/null
+++ b/test/farm/annotate/gold_anno_dir/multi.py,cover
@@ -0,0 +1,5 @@
+> import a.a
+> import b.b
+
+> a.a.a(1)
+> b.b.b(2)