summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-09-28 18:42:30 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-09-28 18:42:30 -0400
commitd33fe1f90216e24039d5cbd003219543d1671313 (patch)
treebbde25cd2c22e8245e0270f656f3180250a7bfb4
parent5de5ff656824bc985f0a31156ffb8e076d178e46 (diff)
downloadpython-coveragepy-git-d33fe1f90216e24039d5cbd003219543d1671313.tar.gz
Remove support for COVERAGE_OPTIONS environment variable.
-rw-r--r--CHANGES.txt7
-rw-r--r--coverage/config.py9
-rw-r--r--coverage/control.py1
-rw-r--r--doc/cmd.rst4
-rw-r--r--tests/farm/run/run_timid.py20
5 files changed, 8 insertions, 33 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 707d6c9c..2dfce50f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,13 @@ Change history for Coverage.py
------------------------------
+4.0dev
+------
+
+- The ``COVERAGE_OPTIONS`` environment variable is no longer supported. It was
+ a hack for ``--timid`` before configuration files were available.
+
+
4.0a1 --- 27 September 2014
---------------------------
diff --git a/coverage/config.py b/coverage/config.py
index 44bf3930..ece68ba8 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -173,15 +173,6 @@ class CoverageConfig(object):
# Options for plugins
self.plugin_options = {}
- def from_environment(self, env_var):
- """Read configuration from the `env_var` environment variable."""
- # Timidity: for nose users, read an environment variable. This is a
- # cheap hack, since the rest of the command line arguments aren't
- # recognized, but it solves some users' problems.
- env = os.environ.get(env_var, '')
- if env:
- self.timid = ('--timid' in env)
-
MUST_BE_LIST = ["omit", "include", "debug", "plugins"]
def from_args(self, **kwargs):
diff --git a/coverage/control.py b/coverage/control.py
index cc1ad36c..fe4e5f15 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -118,7 +118,6 @@ class Coverage(object):
self.config.from_file("setup.cfg", section_prefix="coverage:")
# 3: from environment variables:
- self.config.from_environment('COVERAGE_OPTIONS')
env_data_file = os.environ.get('COVERAGE_FILE')
if env_data_file:
self.config.data_file = env_data_file
diff --git a/doc/cmd.rst b/doc/cmd.rst
index 96c27634..cd6ae955 100644
--- a/doc/cmd.rst
+++ b/doc/cmd.rst
@@ -113,9 +113,7 @@ code as well as your own, add the ``-L`` flag.
If your coverage results seem to be overlooking code that you know has been
executed, try running coverage again with the ``--timid`` flag. This uses a
simpler but slower trace method. Projects that use DecoratorTools, including
-TurboGears, will need to use ``--timid`` to get correct results. This option
-can also be enabled by setting the environment variable COVERAGE_OPTIONS to
-``--timid``.
+TurboGears, will need to use ``--timid`` to get correct results.
If you are measuring coverage in a multi-process program, or across a number of
machines, you'll want the ``--parallel-mode`` switch to keep the data separate
diff --git a/tests/farm/run/run_timid.py b/tests/farm/run/run_timid.py
index d4e69a46..99155b85 100644
--- a/tests/farm/run/run_timid.py
+++ b/tests/farm/run/run_timid.py
@@ -37,24 +37,4 @@ else:
# also show the Python function.
contains("out/showtraceout.txt", "regular PyTracer")
-# Try the environment variable.
-old_opts = os.environ.get('COVERAGE_OPTIONS')
-os.environ['COVERAGE_OPTIONS'] = '--timid'
-
-run("""
- coverage run showtrace.py regular
- coverage run --timid showtrace.py timid
- """, rundir="out", outfile="showtraceout.txt")
-
-contains("out/showtraceout.txt",
- "none None",
- "timid PyTracer",
- "regular PyTracer",
- )
-
-if old_opts:
- os.environ['COVERAGE_OPTIONS'] = old_opts
-else:
- del os.environ['COVERAGE_OPTIONS']
-
clean("out")