Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  All wikisource tests of pywikibot-ci fails. Tests are processed with pytest.
  
  The failing tests are `replacebot_tests` and `ui_tests`.
  
  replacebot_tests failure
  ------------------------
  
    ___________________ TestReplacementsMain.test_cmd_and_fix 
_____________________
    
    self = <tests.replacebot_tests.TestReplacementsMain 
testMethod=test_cmd_and_fix>
    
        def test_cmd_and_fix(self):
            """Test command line and fix replacements together."""
            bot = self._get_bot(True, '1', '2', '-fix:has-msg')
            self.assertLength(bot.replacements, 2)
            self._test_replacement(bot.replacements[0])
            self._test_fix_replacement(bot.replacements[1])
        
    >       self.assertEqual([
                'The summary message for the command line replacements will be '
                'something like: Bot: Automated text replacement  (-1 +2)',
            ], pywikibot.bot.ui.pop_output())
    E       AssertionError: Lists differ: ['The summary message for the command 
line [74 chars]+2)'] != ['Python 3.8.18 (default, Jul 16 2024, 19:0[139 
chars]+2)']
    E       
    E       First differing element 0:
    E       'The summary message for the command line [73 chars] +2)'
    E       'Python 3.8.18 (default, Jul 16 2024, 19:0[16 chars]4.0]'
    E       
    E       Second list contains 1 additional elements.
    E       First extra element 1:
    E       'The summary message for the command line replacements will be 
something like: Bot: Automated text replacement  (-1 +2)'
    E       
    E       + ['Python 3.8.18 (default, Jul 16 2024, 19:04:00) \n[GCC 11.4.0]',
    E       - ['The summary message for the command line replacements will be 
something '
    E       ? ^
    E       
    E       +  'The summary message for the command line replacements will be 
something '
    E       ? ^
    E       
    E          'like: Bot: Automated text replacement  (-1 +2)']
  
  ui_tests failure
  ----------------
  
                try:
                    package = import_module(name)
                except ImportError as e:
                    data[name] = {'name': name, 'err': e}
                    continue
        
                info = {'package': package, 'name': name}
        
                if name in builtin_packages:
                    info['type'] = 'builtins'
        
                if '__file__' in package.__dict__:
                    # Determine if this file part is of the standard library.
                    # possible Namespace package
                    if not hasattr(package, '__file__') or package.__file__ is 
None:
                        _file = None
                        _path = pathlib.Path(package.__path__[0])
                    else:
                        _file = pathlib.Path(package.__file__)
                        _path = _file.parent
                    if _path == std_lib_dir:
                        std_lib_packages.append(name)
                        if standard_lib is False:
                            continue
                        info['type'] = 'standard library'
        
                    # Strip '__init__.py' from the filename.
                    if (not hasattr(package, '__file__')
                            or package.__file__ is None
                            or _file.name == '__init__.py'):
                        path = _path
                    else:
                        path = _file
        
                    info['path'] = path
    >               assert path not in paths, (
                        f'Path {path} of the package {name} is in defined paths 
as '
                        f'{paths[path]}'
                    )
    E               AssertionError: Path 
/opt/hostedtoolcache/Python/3.8.18/x64/bin/pytest of the package __mp_main__ is 
in defined paths as __main__
    
    pywikibot/version.py:412: AssertionError
  
  see https://github.com/wikimedia/pywikibot/actions/runs/12096945823

TASK DETAIL
  https://phabricator.wikimedia.org/T381199

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, pywikibot-bugs-list, Xqt, mevo, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Aram, Viztor, Wenyi, Tbscho, 
MayS, Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, 
jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to