Пример #1
0
 def test_get_license_for_package(self):
     output = get_license_info(packages=["Python"])
     self.assertTrue(output.startswith("Python"))
     self.assertTrue(output.strip().endswith("PSF license"))
Пример #2
0
 def test_csv_output(self):
     output = get_license_info(output_csv=True)
     csv_reader = csv.reader(StringIO(output))
     for row in csv_reader:
         self.assertEqual(len(row), 2)
Пример #3
0
 def test_get_all_licenses(self):
     output = get_license_info()
     self.assertGreater(len(output), 0)