summaryrefslogtreecommitdiff
path: root/tests/modules
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-02-02 11:15:11 -0500
committerNed Batchelder <ned@nedbatchelder.com>2013-02-02 11:15:11 -0500
commitd5f8295256d04ba8cb5b42a16ce741a34c9bb3c5 (patch)
treeff8c6d6310bb3865411d40198c07f26eb5709959 /tests/modules
parentb5a466fc3d7a71fc811b2430f04e6fc270858935 (diff)
downloadpython-coveragepy-d5f8295256d04ba8cb5b42a16ce741a34c9bb3c5.tar.gz
Move the test directory to tests to avoid conflicts with the stdlib test package.
Diffstat (limited to 'tests/modules')
-rw-r--r--tests/modules/aa/__init__.py1
-rw-r--r--tests/modules/aa/afile.odd.py1
-rw-r--r--tests/modules/aa/afile.py1
-rw-r--r--tests/modules/aa/bb.odd/bfile.py1
-rw-r--r--tests/modules/aa/bb/__init__.py1
-rw-r--r--tests/modules/aa/bb/bfile.odd.py1
-rw-r--r--tests/modules/aa/bb/bfile.py1
-rw-r--r--tests/modules/aa/bb/cc/__init__.py0
-rw-r--r--tests/modules/aa/bb/cc/cfile.py1
-rw-r--r--tests/modules/aa/zfile.py1
-rw-r--r--tests/modules/covmod1.py3
-rw-r--r--tests/modules/pkg1/__init__.py3
-rw-r--r--tests/modules/pkg1/__main__.py3
-rw-r--r--tests/modules/pkg1/p1a.py5
-rw-r--r--tests/modules/pkg1/p1b.py3
-rw-r--r--tests/modules/pkg1/p1c.py3
-rw-r--r--tests/modules/pkg1/runmod2.py3
-rw-r--r--tests/modules/pkg1/sub/__init__.py0
-rw-r--r--tests/modules/pkg1/sub/__main__.py3
-rw-r--r--tests/modules/pkg1/sub/ps1a.py3
-rw-r--r--tests/modules/pkg1/sub/runmod3.py3
-rw-r--r--tests/modules/pkg2/__init__.py2
-rw-r--r--tests/modules/pkg2/p2a.py3
-rw-r--r--tests/modules/pkg2/p2b.py3
-rw-r--r--tests/modules/runmod1.py3
-rw-r--r--tests/modules/usepkgs.py4
26 files changed, 56 insertions, 0 deletions
diff --git a/tests/modules/aa/__init__.py b/tests/modules/aa/__init__.py
new file mode 100644
index 0000000..77593d8
--- /dev/null
+++ b/tests/modules/aa/__init__.py
@@ -0,0 +1 @@
+# aa
diff --git a/tests/modules/aa/afile.odd.py b/tests/modules/aa/afile.odd.py
new file mode 100644
index 0000000..c6f49e1
--- /dev/null
+++ b/tests/modules/aa/afile.odd.py
@@ -0,0 +1 @@
+# afile.odd.py
diff --git a/tests/modules/aa/afile.py b/tests/modules/aa/afile.py
new file mode 100644
index 0000000..3f0e38d
--- /dev/null
+++ b/tests/modules/aa/afile.py
@@ -0,0 +1 @@
+# afile.py
diff --git a/tests/modules/aa/bb.odd/bfile.py b/tests/modules/aa/bb.odd/bfile.py
new file mode 100644
index 0000000..9087540
--- /dev/null
+++ b/tests/modules/aa/bb.odd/bfile.py
@@ -0,0 +1 @@
+# bfile.py
diff --git a/tests/modules/aa/bb/__init__.py b/tests/modules/aa/bb/__init__.py
new file mode 100644
index 0000000..ffbe624
--- /dev/null
+++ b/tests/modules/aa/bb/__init__.py
@@ -0,0 +1 @@
+# bb
diff --git a/tests/modules/aa/bb/bfile.odd.py b/tests/modules/aa/bb/bfile.odd.py
new file mode 100644
index 0000000..b45cba8
--- /dev/null
+++ b/tests/modules/aa/bb/bfile.odd.py
@@ -0,0 +1 @@
+# bfile.odd.py
diff --git a/tests/modules/aa/bb/bfile.py b/tests/modules/aa/bb/bfile.py
new file mode 100644
index 0000000..9087540
--- /dev/null
+++ b/tests/modules/aa/bb/bfile.py
@@ -0,0 +1 @@
+# bfile.py
diff --git a/tests/modules/aa/bb/cc/__init__.py b/tests/modules/aa/bb/cc/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/modules/aa/bb/cc/__init__.py
diff --git a/tests/modules/aa/bb/cc/cfile.py b/tests/modules/aa/bb/cc/cfile.py
new file mode 100644
index 0000000..7976475
--- /dev/null
+++ b/tests/modules/aa/bb/cc/cfile.py
@@ -0,0 +1 @@
+# cfile.py
diff --git a/tests/modules/aa/zfile.py b/tests/modules/aa/zfile.py
new file mode 100644
index 0000000..924f9b7
--- /dev/null
+++ b/tests/modules/aa/zfile.py
@@ -0,0 +1 @@
+# zfile.py
diff --git a/tests/modules/covmod1.py b/tests/modules/covmod1.py
new file mode 100644
index 0000000..b3f5e5f
--- /dev/null
+++ b/tests/modules/covmod1.py
@@ -0,0 +1,3 @@
+# covmod1.py: Simplest module for testing.
+i = 1
+i += 1
diff --git a/tests/modules/pkg1/__init__.py b/tests/modules/pkg1/__init__.py
new file mode 100644
index 0000000..2dfeb9c
--- /dev/null
+++ b/tests/modules/pkg1/__init__.py
@@ -0,0 +1,3 @@
+# This __init__.py has a module-level docstring, which is counted as a
+# statement.
+"""A simple package for testing with."""
diff --git a/tests/modules/pkg1/__main__.py b/tests/modules/pkg1/__main__.py
new file mode 100644
index 0000000..66ce595
--- /dev/null
+++ b/tests/modules/pkg1/__main__.py
@@ -0,0 +1,3 @@
+# Used in the tests for run_python_module
+import sys
+print("pkg1.__main__: passed %s" % sys.argv[1])
diff --git a/tests/modules/pkg1/p1a.py b/tests/modules/pkg1/p1a.py
new file mode 100644
index 0000000..be5fcdd
--- /dev/null
+++ b/tests/modules/pkg1/p1a.py
@@ -0,0 +1,5 @@
+import os, sys
+
+# Invoke functions in os and sys so we can see if we measure code there.
+x = sys.getcheckinterval()
+y = os.getcwd()
diff --git a/tests/modules/pkg1/p1b.py b/tests/modules/pkg1/p1b.py
new file mode 100644
index 0000000..59d6fb5
--- /dev/null
+++ b/tests/modules/pkg1/p1b.py
@@ -0,0 +1,3 @@
+x = 1
+y = 2
+z = 3
diff --git a/tests/modules/pkg1/p1c.py b/tests/modules/pkg1/p1c.py
new file mode 100644
index 0000000..a9aeef0
--- /dev/null
+++ b/tests/modules/pkg1/p1c.py
@@ -0,0 +1,3 @@
+a = 1
+b = 2
+c = 3
diff --git a/tests/modules/pkg1/runmod2.py b/tests/modules/pkg1/runmod2.py
new file mode 100644
index 0000000..b52964c
--- /dev/null
+++ b/tests/modules/pkg1/runmod2.py
@@ -0,0 +1,3 @@
+# Used in the tests for run_python_module
+import sys
+print("runmod2: passed %s" % sys.argv[1])
diff --git a/tests/modules/pkg1/sub/__init__.py b/tests/modules/pkg1/sub/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/modules/pkg1/sub/__init__.py
diff --git a/tests/modules/pkg1/sub/__main__.py b/tests/modules/pkg1/sub/__main__.py
new file mode 100644
index 0000000..b5be9f1
--- /dev/null
+++ b/tests/modules/pkg1/sub/__main__.py
@@ -0,0 +1,3 @@
+# Used in the tests for run_python_module
+import sys
+print("pkg1.sub.__main__: passed %s" % sys.argv[1])
diff --git a/tests/modules/pkg1/sub/ps1a.py b/tests/modules/pkg1/sub/ps1a.py
new file mode 100644
index 0000000..4b6a15c
--- /dev/null
+++ b/tests/modules/pkg1/sub/ps1a.py
@@ -0,0 +1,3 @@
+d = 1
+e = 2
+f = 3
diff --git a/tests/modules/pkg1/sub/runmod3.py b/tests/modules/pkg1/sub/runmod3.py
new file mode 100644
index 0000000..3a1ad15
--- /dev/null
+++ b/tests/modules/pkg1/sub/runmod3.py
@@ -0,0 +1,3 @@
+# Used in the tests for run_python_module
+import sys
+print("runmod3: passed %s" % sys.argv[1])
diff --git a/tests/modules/pkg2/__init__.py b/tests/modules/pkg2/__init__.py
new file mode 100644
index 0000000..090efbf
--- /dev/null
+++ b/tests/modules/pkg2/__init__.py
@@ -0,0 +1,2 @@
+# This is an __init__.py file, with no executable statements in it.
+# This comment shouldn't confuse the parser.
diff --git a/tests/modules/pkg2/p2a.py b/tests/modules/pkg2/p2a.py
new file mode 100644
index 0000000..b606711
--- /dev/null
+++ b/tests/modules/pkg2/p2a.py
@@ -0,0 +1,3 @@
+q = 1
+r = 1
+s = 1
diff --git a/tests/modules/pkg2/p2b.py b/tests/modules/pkg2/p2b.py
new file mode 100644
index 0000000..7a34e2c
--- /dev/null
+++ b/tests/modules/pkg2/p2b.py
@@ -0,0 +1,3 @@
+t = 1
+u = 1
+v = 1
diff --git a/tests/modules/runmod1.py b/tests/modules/runmod1.py
new file mode 100644
index 0000000..671d81e
--- /dev/null
+++ b/tests/modules/runmod1.py
@@ -0,0 +1,3 @@
+# Used in the tests for run_python_module
+import sys
+print("runmod1: passed %s" % sys.argv[1])
diff --git a/tests/modules/usepkgs.py b/tests/modules/usepkgs.py
new file mode 100644
index 0000000..93c7d90
--- /dev/null
+++ b/tests/modules/usepkgs.py
@@ -0,0 +1,4 @@
+import pkg1.p1a, pkg1.p1b
+import pkg2.p2a, pkg2.p2b
+import othermods.othera, othermods.otherb
+import othermods.sub.osa, othermods.sub.osb