Xqt created this task.
Xqt added a project: Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
Restricted Application added a project: Pywikibot.
TASK DESCRIPTION
==================================== ERRORS
====================================
___________ ERROR at setup of TestObsoleteSite.test_alias_code_site
____________
cls = <class 'tests.site_tests.TestObsoleteSite'>
@classmethod
def setUpClass(cls):
"""Setup the class."""
with patch.object(pywikibot, 'warn') as warn_mock:
super(TestObsoleteSite, cls).setUpClass()
warn_mock.assert_called_once_with(
'Site wikipedia:ja instantiated using different code "jp"',
> UserWarning, 2)
tests/site_tests.py:3385:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
_mock_self = <MagicMock name=u'warn' id='140184334278032'>
args = ('Site wikipedia:ja instantiated using different code "jp"', <type
'exceptions.UserWarning'>, 2)
kwargs = {}, self = <MagicMock name=u'warn' id='140184334278032'>
msg = "Expected 'warn' to be called once. Called 2 times."
def assert_called_once_with(_mock_self, *args, **kwargs):
"""assert that the mock was called exactly once and with the
specified
arguments."""
self = _mock_self
if not self.call_count == 1:
msg = ("Expected '%s' to be called once. Called %s times." %
(self._mock_name or 'mock', self.call_count))
> raise AssertionError(msg)
E AssertionError: Expected 'warn' to be called once. Called 2
times.
../../../virtualenv/python2.7.15/lib/python2.7/site-packages/mock/mock.py:947:
AssertionError
------------------------------ Captured log setup
------------------------------
logging.py 109 VERBOSE Site wikipedia:mh instantiated and
marked "obsolete" to prevent access
logging.py 109 VERBOSE Site wikipedia:ja instantiated
using aliases code of jp
_____________ ERROR at setup of TestObsoleteSite.test_locked_site
______________
cls = <class 'tests.site_tests.TestObsoleteSite'>
@classmethod
def setUpClass(cls):
"""Setup the class."""
with patch.object(pywikibot, 'warn') as warn_mock:
super(TestObsoleteSite, cls).setUpClass()
warn_mock.assert_called_once_with(
'Site wikipedia:ja instantiated using different code "jp"',
> UserWarning, 2)
tests/site_tests.py:3385:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
_mock_self = <MagicMock name=u'warn' id='140184334278032'>
args = ('Site wikipedia:ja instantiated using different code "jp"', <type
'exceptions.UserWarning'>, 2)
kwargs = {}, self = <MagicMock name=u'warn' id='140184334278032'>
msg = "Expected 'warn' to be called once. Called 2 times."
def assert_called_once_with(_mock_self, *args, **kwargs):
"""assert that the mock was called exactly once and with the
specified
arguments."""
self = _mock_self
if not self.call_count == 1:
msg = ("Expected '%s' to be called once. Called %s times." %
(self._mock_name or 'mock', self.call_count))
> raise AssertionError(msg)
E AssertionError: Expected 'warn' to be called once. Called 2
times.
../../../virtualenv/python2.7.15/lib/python2.7/site-packages/mock/mock.py:947:
AssertionError
_____________ ERROR at setup of TestObsoleteSite.test_removed_site
_____________
cls = <class 'tests.site_tests.TestObsoleteSite'>
@classmethod
def setUpClass(cls):
"""Setup the class."""
with patch.object(pywikibot, 'warn') as warn_mock:
super(TestObsoleteSite, cls).setUpClass()
warn_mock.assert_called_once_with(
'Site wikipedia:ja instantiated using different code "jp"',
> UserWarning, 2)
tests/site_tests.py:3385:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
_mock_self = <MagicMock name=u'warn' id='140184334278032'>
args = ('Site wikipedia:ja instantiated using different code "jp"', <type
'exceptions.UserWarning'>, 2)
kwargs = {}, self = <MagicMock name=u'warn' id='140184334278032'>
msg = "Expected 'warn' to be called once. Called 2 times."
def assert_called_once_with(_mock_self, *args, **kwargs):
"""assert that the mock was called exactly once and with the
specified
arguments."""
self = _mock_self
if not self.call_count == 1:
msg = ("Expected '%s' to be called once. Called %s times." %
(self._mock_name or 'mock', self.call_count))
> raise AssertionError(msg)
E AssertionError: Expected 'warn' to be called once. Called 2
times.
../../../virtualenv/python2.7.15/lib/python2.7/site-packages/mock/mock.py:947:
AssertionError
see: https://api.travis-ci.org/v3/job/543725818/log.txt
TASK DETAIL
https://phabricator.wikimedia.org/T225459
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, Viztor, DannyS712, Wenyi, Tbscho, MayS,
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti,
Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs