summaryrefslogtreecommitdiff
path: root/tests/modules
diff options
context:
space:
mode:
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 00000000..77593d8f
--- /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 00000000..c6f49e18
--- /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 00000000..3f0e38d1
--- /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 00000000..90875404
--- /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 00000000..ffbe6240
--- /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 00000000..b45cba8c
--- /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 00000000..90875404
--- /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 00000000..e69de29b
--- /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 00000000..79764751
--- /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 00000000..924f9b77
--- /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 00000000..b3f5e5f2
--- /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 00000000..2dfeb9c1
--- /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 00000000..66ce5956
--- /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 00000000..be5fcdd3
--- /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 00000000..59d6fb54
--- /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 00000000..a9aeef04
--- /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 00000000..b52964cb
--- /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 00000000..e69de29b
--- /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 00000000..b5be9f1c
--- /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 00000000..4b6a15cc
--- /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 00000000..3a1ad155
--- /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 00000000..090efbf5
--- /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 00000000..b606711d
--- /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 00000000..7a34e2c6
--- /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 00000000..671d81ef
--- /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 00000000..93c7d904
--- /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