예제 #1
0
 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.DEBUG))
예제 #2
0
 def test_is_distutils_logs_setup_py_text_found(self):
     is_distutils(self._distutils_setup_py_pkg())
     expected = ['setup.py file found.',
                 'No PKG-INFO file found.',
                 'Found distutils text in setup.py.']
     self.assertEqual(expected, self.get_logs(logging.DEBUG))
예제 #3
0
 def test_is_distutils_logs_setup_py_text_not_found(self):
     directory = self._random_setup_py_pkg()
     is_distutils(directory)
     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))
예제 #4
0
 def test_setup_py_not_importing_distutils_is_not_distutils_based(self):
     self.assertFalse(is_distutils(self._random_setup_py_pkg()))
예제 #5
0
 def test_pkg_info_and_non_distutils_setup_py_is_distutils_based(self):
     self.assertTrue(is_distutils(self._pkg_info_with_no_distutils()))
예제 #6
0
 def test_pkg_info_file_and_setup_py_is_distutils_based(self):
     self.assertTrue(is_distutils(self._distutils_pkg_info()))
예제 #7
0
 def test_setup_py_importing_distutils_is_distutils_based(self):
     self.assertTrue(is_distutils(self._distutils_setup_py_pkg()))
예제 #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))