summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_command_sdist.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-10-19 06:37:22 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-10-19 06:37:22 (GMT)
commit382067b3cfe6ed004b98ff2d2ed9cf3249d8f6b6 (patch)
tree77d7fcfdf8dbcc011a94819c4c1ede731508324b /Lib/packaging/tests/test_command_sdist.py
parent4b5a5f7bd5c966648340b8bdbca54e836658cac7 (diff)
downloadcpython-382067b3cfe6ed004b98ff2d2ed9cf3249d8f6b6.zip
cpython-382067b3cfe6ed004b98ff2d2ed9cf3249d8f6b6.tar.gz
cpython-382067b3cfe6ed004b98ff2d2ed9cf3249d8f6b6.tar.bz2
Change signature of packaging.tests.support.LoggingCatcher.get_logs.
I need this for some tests, and it makes code clearer. This commit also changes some assertEqual calls to use (actual, expected) order and fix some pyflakes warnings.
Diffstat (limited to 'Lib/packaging/tests/test_command_sdist.py')
-rw-r--r--Lib/packaging/tests/test_command_sdist.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/packaging/tests/test_command_sdist.py b/Lib/packaging/tests/test_command_sdist.py
index ddc6bf7..7ea138c 100644
--- a/Lib/packaging/tests/test_command_sdist.py
+++ b/Lib/packaging/tests/test_command_sdist.py
@@ -2,7 +2,6 @@
import os
import zipfile
import tarfile
-import logging
from packaging.tests.support import requires_zlib
@@ -221,7 +220,7 @@ class SDistTestCase(support.TempdirManager,
# with the check subcommand
cmd.ensure_finalized()
cmd.run()
- warnings = self.get_logs(logging.WARN)
+ warnings = self.get_logs()
self.assertEqual(len(warnings), 4)
# trying with a complete set of metadata
@@ -230,13 +229,10 @@ class SDistTestCase(support.TempdirManager,
cmd.ensure_finalized()
cmd.metadata_check = False
cmd.run()
- warnings = self.get_logs(logging.WARN)
- # removing manifest generated warnings
- warnings = [warn for warn in warnings if
- not warn.endswith('-- skipping')]
- # the remaining warnings are about the use of the default file list and
- # the absence of setup.cfg
+ warnings = self.get_logs()
self.assertEqual(len(warnings), 2)
+ self.assertIn('using default file list', warnings[0])
+ self.assertIn("'setup.cfg' file not found", warnings[1])
def test_show_formats(self):
__, stdout = captured_stdout(show_formats)