summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_util.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2011-05-30 10:07:49 (GMT)
committerTarek Ziade <tarek@ziade.org>2011-05-30 10:07:49 (GMT)
commitb1b6e1384cf180657e8301643a4563077183a9e4 (patch)
tree9ba33451b79908d89a8207b1d7b3fa2d3bb59a03 /Lib/packaging/tests/test_util.py
parent43f289ad8882a743d03b92a430f7ab7616e96673 (diff)
downloadcpython-b1b6e1384cf180657e8301643a4563077183a9e4.zip
cpython-b1b6e1384cf180657e8301643a4563077183a9e4.tar.gz
cpython-b1b6e1384cf180657e8301643a4563077183a9e4.tar.bz2
Cleaned up the installer output behavior.
This change also makes sure the logger handlers are not alterated after an installation. That also fixes the remaining environment alteration issue in test_packaging.
Diffstat (limited to 'Lib/packaging/tests/test_util.py')
-rw-r--r--Lib/packaging/tests/test_util.py44
1 files changed, 22 insertions, 22 deletions
diff --git a/Lib/packaging/tests/test_util.py b/Lib/packaging/tests/test_util.py
index 61b4ec7..5a94a73 100644
--- a/Lib/packaging/tests/test_util.py
+++ b/Lib/packaging/tests/test_util.py
@@ -818,51 +818,51 @@ class PackagingLibChecks(support.TempdirManager,
def test_is_setuptools_logs_setup_py_text_found(self):
is_setuptools(self._setuptools_setup_py_pkg())
- expected = ['setup.py file found', 'found setuptools text in setup.py']
- self.assertEqual(expected, self.get_logs(logging.INFO))
+ expected = ['setup.py file found.',
+ 'No egg-info directory found.',
+ 'Found setuptools text in setup.py.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def test_is_setuptools_logs_setup_py_text_not_found(self):
directory = self._random_setup_py_pkg()
is_setuptools(directory)
- info_expected = ['setup.py file found']
- warn_expected = ['no egg-info directory found',
- 'no setuptools text found in setup.py']
- self.assertEqual(info_expected, self.get_logs(logging.INFO))
- self.assertEqual(warn_expected, self.get_logs(logging.WARN))
+ expected = ['setup.py file found.', 'No egg-info directory found.',
+ 'No setuptools text found in setup.py.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def test_is_setuptools_logs_egg_info_dir_found(self):
is_setuptools(self._setuptools_egg_info_pkg())
- expected = ['setup.py file found', 'found egg-info directory']
- self.assertEqual(expected, self.get_logs(logging.INFO))
+ expected = ['setup.py file found.', 'Found egg-info directory.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def test_is_distutils_logs_setup_py_text_found(self):
is_distutils(self._distutils_setup_py_pkg())
- expected = ['setup.py file found', 'found distutils text in setup.py']
- self.assertEqual(expected, self.get_logs(logging.INFO))
+ expected = ['setup.py file found.',
+ 'No PKG-INFO file found.',
+ 'Found distutils text in setup.py.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def test_is_distutils_logs_setup_py_text_not_found(self):
directory = self._random_setup_py_pkg()
is_distutils(directory)
- info_expected = ['setup.py file found']
- warn_expected = ['no PKG-INFO file found',
- 'no distutils text found in setup.py']
- self.assertEqual(info_expected, self.get_logs(logging.INFO))
- self.assertEqual(warn_expected, self.get_logs(logging.WARN))
+ expected = ['setup.py file found.', 'No PKG-INFO file found.',
+ 'No distutils text found in setup.py.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def test_is_distutils_logs_pkg_info_file_found(self):
is_distutils(self._distutils_pkg_info())
- expected = ['setup.py file found', 'PKG-INFO file found']
- self.assertEqual(expected, self.get_logs(logging.INFO))
+ expected = ['setup.py file found.', 'PKG-INFO file found.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def test_is_packaging_logs_setup_cfg_found(self):
is_packaging(self._valid_setup_cfg_pkg())
- expected = ['setup.cfg file found']
- self.assertEqual(expected, self.get_logs(logging.INFO))
+ expected = ['setup.cfg file found.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def test_is_packaging_logs_setup_cfg_not_found(self):
is_packaging(self._empty_dir)
- expected = ['no setup.cfg file found']
- self.assertEqual(expected, self.get_logs(logging.WARN))
+ expected = ['No setup.cfg file found.']
+ self.assertEqual(expected, self.get_logs(logging.DEBUG))
def _write_setuptools_setup_py(self, directory):
self.write_file((directory, 'setup.py'),