summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-26 09:28:30 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-11-26 09:28:30 -0500
commit9dec07e671f911ebd1ce6f6dfafc524c2ae57169 (patch)
tree7fbd614cdb9b87c7954094ee2045ffc8f91d20af
parente05a8b81ce137bf5335fa3496cbee955e0ad4750 (diff)
downloadpython-coveragepy-9dec07e671f911ebd1ce6f6dfafc524c2ae57169.tar.gz
Enable pytest warnings, and fix/silence a few
-rw-r--r--igor.py3
-rw-r--r--tests/test_files.py2
-rw-r--r--tests/test_process.py4
-rw-r--r--tox.ini1
4 files changed, 7 insertions, 3 deletions
diff --git a/igor.py b/igor.py
index b82fc96..8e09cd0 100644
--- a/igor.py
+++ b/igor.py
@@ -26,6 +26,9 @@ import pytest
# disable warnings for some of the more complex setting up of tests.
warnings.simplefilter("default")
+# Silence specific warnings that are not our fault.
+warnings.filterwarnings("ignore", module="xdist", message="type argument to addoption")
+
@contextlib.contextmanager
def ignore_warnings():
diff --git a/tests/test_files.py b/tests/test_files.py
index 2d22730..ec0332e 100644
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -284,4 +284,4 @@ class WindowsFileTest(CoverageTest):
super(WindowsFileTest, self).setUp()
def test_actual_path(self):
- self.assertEquals(actual_path(r'c:\Windows'), actual_path(r'C:\wINDOWS'))
+ self.assertEqual(actual_path(r'c:\Windows'), actual_path(r'C:\wINDOWS'))
diff --git a/tests/test_process.py b/tests/test_process.py
index cc91bd0..02e23e7 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1172,8 +1172,8 @@ class ProcessStartupTest(ProcessCoverageMixin, CoverageTest):
# assert that there are *no* extra data files left over after a combine
data_files = glob.glob(os.getcwd() + '/.coverage*')
- self.assertEquals(len(data_files), 1,
- "Expected only .coverage after combine, looks like there are " + \
+ self.assertEqual(len(data_files), 1,
+ "Expected only .coverage after combine, looks like there are "
"extra data files that were not cleaned up: %r" % data_files)
diff --git a/tox.ini b/tox.ini
index 44c9914..2f643f6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,6 +12,7 @@ deps =
# https://requires.io/github/nedbat/coveragepy/requirements/
git+https://github.com/nedbat/pytest.git@bug2038#egg=pytest==0.0
pytest-xdist==1.15.0
+ pytest-warnings==0.2.0
pip==8.1.2
mock==2.0.0
PyContracts==1.7.9