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()}')
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))
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()))
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])
def test_keys_in_aliases(self): for key in OS_ALIASES.keys(): self.assertIn(key, known_os_names())
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()))
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))
def test_no_warnings_on_known_names(caplog) -> None: for name in known_os_names(): normalize_os_name(name) assert len(caplog.records) == 0
def test_keys_in_aliases() -> None: for key in OS_ALIASES.keys(): assert key in known_os_names()