From f3c8815cbcabaef7d54490b597e5b5a2f6b1612b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 2 Feb 2013 11:27:48 -0500 Subject: Directory changed: test->tests. Adapt. --- MANIFEST.in | 2 +- Makefile | 12 ++++++------ doc/contributing.rst | 8 ++++---- howto.txt | 2 +- igor.py | 14 ++++++------- metacov.ini | 2 +- tests/coveragetest.py | 8 ++++---- tests/farm/html/gold_other/blah_blah_other.html | 4 ++-- tests/farm/html/gold_other/index.html | 2 +- tests/test_api.py | 2 +- tests/test_arcs.py | 2 +- tests/test_cmdline.py | 2 +- tests/test_codeunit.py | 2 +- tests/test_config.py | 2 +- tests/test_coverage.py | 2 +- tests/test_data.py | 2 +- tests/test_execfile.py | 2 +- tests/test_farm.py | 4 ++-- tests/test_files.py | 2 +- tests/test_html.py | 2 +- tests/test_misc.py | 2 +- tests/test_oddball.py | 4 ++-- tests/test_parser.py | 2 +- tests/test_phystokens.py | 2 +- tests/test_process.py | 6 +++--- tests/test_results.py | 2 +- tests/test_summary.py | 26 ++++++++++++------------- tests/test_testing.py | 4 ++-- tests/test_xml.py | 2 +- tox.ini | 6 +++--- 30 files changed, 67 insertions(+), 67 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 0150d90e..d2712d98 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -11,6 +11,6 @@ include requirements.txt include igor.py include tox.ini -recursive-include test * +recursive-include tests * recursive-include doc *.rst global-exclude *.pyc diff --git a/Makefile b/Makefile index eb920945..666d38a5 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,13 @@ default: @echo "* No default action *" -TEST_ZIP = test/zipmods.zip -TEST_EGG = test/eggsrc/dist/covtestegg1-0.0.0-py*.egg +TEST_ZIP = tests/zipmods.zip +TEST_EGG = tests/eggsrc/dist/covtestegg1-0.0.0-py*.egg clean: -rm -f *.pyd */*.pyd -rm -f *.so */*.so - PYTHONPATH=. python test/test_farm.py clean + PYTHONPATH=. python tests/test_farm.py clean -rm -rf build coverage.egg-info dist htmlcov -rm -f *.pyc */*.pyc */*/*.pyc */*/*/*.pyc */*/*/*/*.pyc */*/*/*/*/*.pyc -rm -f *.pyo */*.pyo */*/*.pyo */*/*/*.pyo */*/*/*/*.pyo */*/*/*/*/*.pyo @@ -20,14 +20,14 @@ clean: -rm -f MANIFEST -rm -f .coverage .coverage.* coverage.xml -rm -f $(TEST_ZIP) - -rm -rf test/eggsrc/build test/eggsrc/dist test/eggsrc/*.egg-info + -rm -rf tests/eggsrc/build tests/eggsrc/dist tests/eggsrc/*.egg-info -rm -f setuptools-*.egg distribute-*.egg distribute-*.tar.gz -rm -rf doc/_build sterile: clean -rm -rf .tox* -LINTABLE = coverage igor.py setup.py test +LINTABLE = coverage igor.py setup.py tests lint: -pylint --rcfile=.pylintrc $(LINTABLE) @@ -37,7 +37,7 @@ lint: pep8: pep8 --filename=*.py --ignore=E401,E301 --repeat coverage -tests: +test: tox -e py27 $(ARGS) metacov: diff --git a/doc/contributing.rst b/doc/contributing.rst index 90b9ba1b..6c422b55 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -113,9 +113,9 @@ To limit tox to just a few versions of Python, use the ``-e`` switch:: To run just a few tests, you can use nose test selector syntax:: - $ tox test.test_misc:SetupPyTest.test_metadata + $ tox tests.test_misc:SetupPyTest.test_metadata -This looks in `test/test_misc.py` to find the `SetupPyTest` class, and runs the +This looks in `tests/test_misc.py` to find the `SetupPyTest` class, and runs the `test_metadata` test method. Of course, run all the tests on every version of Python you have, before @@ -129,8 +129,8 @@ I try to keep the coverage.py as clean as possible. I use pylint to alert me to possible problems:: $ make lint - pylint --rcfile=.pylintrc coverage setup.py test - python -m tabnanny coverage setup.py test + pylint --rcfile=.pylintrc coverage setup.py tests + python -m tabnanny coverage setup.py tests python igor.py check_eol The source is pylint-clean, even if it's because there are pragmas quieting diff --git a/howto.txt b/howto.txt index 632467b3..fc1904c2 100644 --- a/howto.txt +++ b/howto.txt @@ -91,4 +91,4 @@ - To run the Javascript tests: - open test/js/index.html in variety of browsers. + open tests/js/index.html in variety of browsers. diff --git a/igor.py b/igor.py index b54ba5da..e093d494 100644 --- a/igor.py +++ b/igor.py @@ -122,8 +122,8 @@ def do_test_with_tracer(tracer, *noseargs): def do_zip_mods(): """Build the zipmods.zip file.""" - zf = zipfile.ZipFile("test/zipmods.zip", "w") - zf.write("test/covmodzip1.py", "covmodzip1.py") + zf = zipfile.ZipFile("tests/zipmods.zip", "w") + zf.write("tests/covmodzip1.py", "covmodzip1.py") zf.close() def do_install_egg(): @@ -132,7 +132,7 @@ def do_install_egg(): # pylint: disable=F0401,E0611,E1101 import distutils.core cur_dir = os.getcwd() - os.chdir("test/eggsrc") + os.chdir("tests/eggsrc") distutils.core.run_setup("setup.py", ["--quiet", "bdist_egg"]) egg = glob.glob("dist/*.egg")[0] distutils.core.run_setup( @@ -188,10 +188,10 @@ def do_check_eol(): check_files("coverage", ["*.py", "*.c"]) check_files("coverage/htmlfiles", ["*.html", "*.css", "*.js"]) - check_file("test/farm/html/src/bom.py", crlf=False) - check_files("test", ["*.py"]) - check_files("test", ["*,cover"], trail_white=False) - check_files("test/js", ["*.js", "*.html"]) + check_file("tests/farm/html/src/bom.py", crlf=False) + check_files("tests", ["*.py"]) + check_files("tests", ["*,cover"], trail_white=False) + check_files("tests/js", ["*.js", "*.html"]) check_file("setup.py") check_file("igor.py") check_file("Makefile") diff --git a/metacov.ini b/metacov.ini index 384a6b03..75bd9d2d 100644 --- a/metacov.ini +++ b/metacov.ini @@ -5,7 +5,7 @@ data_file = $COVERAGE_HOME/.coverage.meta parallel = true source = $COVERAGE_HOME/coverage - $COVERAGE_HOME/test + $COVERAGE_HOME/tests $COVERAGE_HOME/.tox/py25/lib/python2.5/site-packages/coverage $COVERAGE_HOME/.tox/py26/lib/python2.6/site-packages/coverage $COVERAGE_HOME/.tox/py27/lib/python2.7/site-packages/coverage diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 6f6217aa..5613fa69 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -6,8 +6,8 @@ import coverage from coverage.backward import sorted, StringIO # pylint: disable=W0622 from coverage.backward import to_bytes from coverage.control import _TEST_NAME_FILE -from test.backtest import run_command -from test.backunittest import TestCase +from tests.backtest import run_command +from tests.backunittest import TestCase class Tee(object): """A file-like that writes to all the file-likes it has.""" @@ -452,8 +452,8 @@ class CoverageTest(TestCase): # Add our test modules directory to PYTHONPATH. I'm sure there's too # much path munging here, but... here = os.path.dirname(self.nice_file(coverage.__file__, "..")) - testmods = self.nice_file(here, 'test/modules') - zipfile = self.nice_file(here, 'test/zipmods.zip') + testmods = self.nice_file(here, 'tests/modules') + zipfile = self.nice_file(here, 'tests/zipmods.zip') pypath = os.getenv('PYTHONPATH', '') if pypath: pypath += os.pathsep diff --git a/tests/farm/html/gold_other/blah_blah_other.html b/tests/farm/html/gold_other/blah_blah_other.html index ab5ae371..a8255d87 100644 --- a/tests/farm/html/gold_other/blah_blah_other.html +++ b/tests/farm/html/gold_other/blah_blah_other.html @@ -5,7 +5,7 @@ - Coverage for /home/ned/coverage/trunk/test/farm/html/othersrc/other: 100% + Coverage for /home/ned/coverage/trunk/tests/farm/html/othersrc/other: 100% @@ -19,7 +19,7 @@