Ejemplo n.º 1
0
 def test_no_warnings_on_known_names(self) -> None:
     for name in known_os_names():
         with self.captured_logging(logging.WARNING) as captured:
             normalize_os_name(name)
             self.assertEqual(
                 0, len(captured.warnings()),
                 f'Recieved unexpected warnings: {captured.warnings()}')
Ejemplo n.º 2
0
 def test_no_warnings_on_known_names(self):
     for name in known_os_names():
         with self.warnings() as warning_list:
             normalize_os_name(name)
             self.assertEqual(
                 0, len(warning_list),
                 'Recieved unexpected warnings: {}'.format(warning_list))
Ejemplo n.º 3
0
 def test_no_warnings_on_known_names(self):
     for name in known_os_names():
         with self.captured_logging() as captured:
             normalize_os_name(name)
             self.assertEqual(
                 0, len(captured.warnings()),
                 'Recieved unexpected warnings: {}'.format(
                     captured.warnings()))
Ejemplo n.º 4
0
  def _handle_system_specific_libraries(self, libraries):
    general_confs = {'default', 'sources', 'javadoc'}
    specific_confs = set(libraries) - general_confs
    os_name = normalize_os_name(get_os_name())

    for conf in specific_confs:
      for name in known_os_names():
        if name in conf.lower() and normalize_os_name(name) == os_name:
          # Assume this conf actually represents libraries that should be mapped to 'default' on
          # this system.
          libraries['default'].update(libraries[conf])
Ejemplo n.º 5
0
 def test_keys_in_aliases(self):
     for key in OS_ALIASES.keys():
         self.assertIn(key, known_os_names())
Ejemplo n.º 6
0
 def test_no_warnings_on_known_names(self):
   for name in known_os_names():
     with self.captured_logging(logging.WARNING) as captured:
       normalize_os_name(name)
       self.assertEqual(0, len(captured.warnings()),
                        'Recieved unexpected warnings: {}'.format(captured.warnings()))
Ejemplo n.º 7
0
 def test_keys_in_aliases(self):
   for key in OS_ALIASES.keys():
     self.assertIn(key, known_os_names())
Ejemplo n.º 8
0
 def test_no_warnings_on_known_names(self):
   for name in known_os_names():
     with self.warnings() as warning_list:
       normalize_os_name(name)
       self.assertEqual(0, len(warning_list),
                        'Recieved unexpected warnings: {}'.format(warning_list))
Ejemplo n.º 9
0
def test_no_warnings_on_known_names(caplog) -> None:
    for name in known_os_names():
        normalize_os_name(name)
        assert len(caplog.records) == 0
Ejemplo n.º 10
0
def test_keys_in_aliases() -> None:
    for key in OS_ALIASES.keys():
        assert key in known_os_names()