Example #1
0
 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.DEBUG))
Example #2
0
 def test_is_setuptools_logs_setup_py_text_found(self):
     is_setuptools(self._setuptools_setup_py_pkg())
     expected = ['setup.py file found.',
                 'No egg-info directory found.',
                 'Found setuptools text in setup.py.']
     self.assertEqual(expected, self.get_logs(logging.DEBUG))
Example #3
0
 def test_is_setuptools_logs_setup_py_text_not_found(self):
     directory = self._random_setup_py_pkg()
     is_setuptools(directory)
     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))
Example #4
0
 def test_setup_py_not_importing_setuptools_is_not_setuptools_based(self):
     self.assertFalse(is_setuptools(self._random_setup_py_pkg()))
Example #5
0
 def test_egg_info_and_non_setuptools_setup_py_is_setuptools_based(self):
     self.assertTrue(is_setuptools(self._egg_info_with_no_setuptools()))
Example #6
0
 def test_egg_info_dir_and_setup_py_is_setuptools_based(self):
     self.assertTrue(is_setuptools(self._setuptools_egg_info_pkg()))
Example #7
0
 def test_setup_py_importing_setuptools_is_setuptools_based(self):
     self.assertTrue(is_setuptools(self._setuptools_setup_py_pkg()))
Example #8
0
 def test_empty_package_is_not_based_on_anything(self):
     self.assertFalse(is_setuptools(self._empty_dir))
     self.assertFalse(is_distutils(self._empty_dir))
     self.assertFalse(is_packaging(self._empty_dir))