[recurring] Replace assertRaises with assertRaisesRegex
Open, LowPublic

Description

unittest.assertRaises is almost always lazy, and should be avoided.
The only desirable use of unittest.assertRaises is:

with self.assertRaises(ValueError) as cm:
    self.assertEqual(cm.exception, '.....')

unitest.assertRaisesRegex has an extra parameter to check the exception message, and should be used instead. By checking the exception message, the unit test verifies that the exception is precisely the one which was expected, rather than only of the same type as expected.

Mentor: @jayvdb

pywikibot has 22 unit test modules that use assertRaises and probably need upgrading:

$ git grep 'assertRaises(' tests | grep -v 'with.* as ' | cut -d ':' -f 1 | sort -u | wc -l
22
$ git grep 'assertRaises(' tests | grep -v 'with.* as '
tests/api_tests.py:            self.assertRaises(api.APIMWException, req.submit)
tests/api_tests.py:            self.assertRaises(api.APIMWException, req.submit)
tests/api_tests.py:            self.assertRaises(api.APIMWException, req.submit)
tests/api_tests.py:        self.assertRaises(KeyError, pi.__getitem__, 'foobar')
tests/api_tests.py:        self.assertRaises(KeyError, pi.__getitem__, 'foobar+foobar')
tests/api_tests.py:        self.assertRaises(KeyError, pi.__getitem__, 'query+foobar')
tests/api_tests.py:        self.assertRaises(KeyError, pi.submodules, 'edit')
tests/api_tests.py:        self.assertRaises(KeyError, options.__setitem__, 'invalid_name', True)
tests/api_tests.py:        self.assertRaises(ValueError, options.__setitem__, 'anon', 'invalid_value')
tests/api_tests.py:        self.assertRaises(KeyError, options._set_site, self.get_site(),
tests/api_tests.py:        self.assertRaises(TypeError, options._set_site, self.get_site(),
tests/api_tests.py:        self.assertRaises(AssertionError, self.gen.set_namespace, 0)
tests/api_tests.py:        self.assertRaises(AssertionError, self.gen.set_namespace, 1)
tests/api_tests.py:        self.assertRaises(AssertionError, self.gen.set_namespace, None)
tests/api_tests.py:        self.assertRaises(TypeError, self.gen.set_namespace, None)
tests/api_tests.py:        self.assertRaises(pywikibot.NoUsername, req.submit)
tests/api_tests.py:        self.assertRaises(api.APIError, req.submit)
tests/api_tests.py:        self.assertRaises(pywikibot.NoUsername, req.submit)
tests/api_tests.py:        self.assertRaises(api.APIError, req.submit)
tests/archivebot_tests.py:        self.assertRaises(archivebot.MalformedConfigError, archivebot.str2time, '4000@')
tests/archivebot_tests.py:        self.assertRaises(archivebot.MalformedConfigError, archivebot.str2time, '$1')
tests/bot_tests.py:                self.assertRaises(StopIteration, next, self._page_iter)
tests/diff_tests.py:        self.assertRaises(ImportError, html_comparator, '')
tests/djvu_tests.py:        self.assertRaises(IOError, DjVuFile, self.file_djvu_not_existing)
tests/djvu_tests.py:        self.assertRaises(ValueError, djvu.get_page, 100)
tests/djvu_tests.py:        self.assertRaises(ValueError, djvu.get_page, 1)
tests/djvu_tests.py:        self.assertRaises(ValueError, djvu.whiten_page, 100)
tests/djvu_tests.py:        self.assertRaises(ValueError, djvu.delete_page, 100)
tests/dry_site_tests.py:        self.assertRaises(UnknownSite, self.call_this_user_req_function, args, kwargs)
tests/dry_site_tests.py:        self.assertRaises(NotImplementedError, self.too_new)
tests/edit_failure_tests.py:        self.assertRaises(LockedPage, page.save)
tests/edit_failure_tests.py:        self.assertRaises(PageCreatedConflict, page.save, createonly=True)
tests/edit_failure_tests.py:        self.assertRaises(NoCreateError, page.save, nocreate=True)
tests/edit_failure_tests.py:        self.assertRaises(Error, mysite.movepage,
tests/edit_failure_tests.py:            self.assertRaises(NoPage, mysite.movepage,
tests/edit_failure_tests.py:        self.assertRaises(pywikibot.PageNotSaved, item.save)
tests/eventstreams_tests.py:        with self.assertRaises(NotImplementedError):
tests/eventstreams_tests.py:        with self.assertRaises(TypeError):
tests/flow_edit_tests.py:        self.assertRaises(LockedPage, topic.reply, content, 'wikitext')
tests/flow_edit_tests.py:        self.assertRaises(LockedPage, topic_root.reply, content, 'wikitext')
tests/flow_edit_tests.py:        self.assertRaises(LockedPage, topic_reply.reply, content, 'wikitext')
tests/flow_tests.py:        self.assertRaises(TypeError, Topic.from_topiclist_data, self.site, '', {})
tests/flow_tests.py:        self.assertRaises(TypeError, Topic.from_topiclist_data, board, 521, {})
tests/flow_tests.py:        self.assertRaises(TypeError, Topic.from_topiclist_data, board,
tests/flow_tests.py:        self.assertRaises(NoPage, Topic.from_topiclist_data, board,
tests/flow_tests.py:        self.assertRaises(TypeError, Post.fromJSON, board, 'abc', {})
tests/flow_tests.py:        self.assertRaises(TypeError, Post.fromJSON, real_topic, 1234, {})
tests/flow_tests.py:        self.assertRaises(TypeError, Post.fromJSON, real_topic, 'abc', [])
tests/flow_tests.py:        self.assertRaises(NoPage, Post.fromJSON, fake_topic, 'abc',
tests/flow_tests.py:        self.assertRaises(ValueError, Topic.from_topiclist_data,
tests/flow_tests.py:        self.assertRaises(ValueError, Topic.from_topiclist_data,
tests/flow_tests.py:        self.assertRaises(ValueError, Topic.from_topiclist_data, board,
tests/flow_tests.py:        self.assertRaises(AssertionError, Topic.from_topiclist_data, board,
tests/flow_tests.py:        self.assertRaises(ValueError, Post.fromJSON, real_topic, 'abc', {})
tests/flow_tests.py:        self.assertRaises(ValueError, Post.fromJSON, real_topic, 'abc',
tests/flow_tests.py:        self.assertRaises(ValueError, Post.fromJSON, real_topic, 'abc',
tests/flow_tests.py:        self.assertRaises(AssertionError, Post.fromJSON, real_topic, 'abc',
tests/i18n_tests.py:        self.assertRaises(i18n.TranslationError, i18n.twtranslate,
tests/i18n_tests.py:        self.assertRaises(i18n.TranslationError,
tests/i18n_tests.py:        with self.assertRaises(IndexError):
tests/interwikidata_tests.py:        self.assertRaises(ValueError, DummyBot, generator=[wt_page],
tests/logentry_tests.py:            self.assertRaises(KeyError, logentry.comment)
tests/logentry_tests.py:            self.assertRaises(KeyError, logentry.page)
tests/logentry_tests.py:        with self.assertRaises(pywikibot.NoMoveTarget):
tests/logentry_tests.py:        with self.assertRaises(pywikibot.NoMoveTarget):
tests/logentry_tests.py:                self.assertRaises(KeyError, logentry.title)
tests/logentry_tests.py:        with self.assertRaises(pywikibot.NoPage):
tests/logentry_tests.py:        with self.assertRaises(pywikibot.NoPage):
tests/page_tests.py:            self.assertRaises(NotImplementedError, mainpage.page_image)
tests/pagegenerators_tests.py:        self.assertRaises(calendar.IllegalMonthError, self._run_test, 0)
tests/pagegenerators_tests.py:        self.assertRaises(calendar.IllegalMonthError, self._run_test, 12, 13)
tests/pagegenerators_tests.py:        self.assertRaises(UnknownExtension, gf.handleArg, '-ql:2')
tests/pagegenerators_tests.py:        self.assertRaises(
tests/pagegenerators_tests.py:        self.assertRaises(ValueError, gf.handleArg, '-recentchanges:3,2,1')
tests/pagegenerators_tests.py:        self.assertRaises(ValueError, gf.handleArg, '-recentchanges:12,-12')
tests/pagegenerators_tests.py:        self.assertRaises(
tests/pagegenerators_tests.py:        self.assertRaises(
tests/pagegenerators_tests.py:                with self.assertRaises(NotImplementedError):
tests/pagegenerators_tests.py:        self.assertRaises(NotImplementedError,
tests/pagegenerators_tests.py:        self.assertRaises(NotImplementedError, gf.handleArg, '-anotherlog')
tests/pagegenerators_tests.py:        with self.assertRaises(ValueError):
tests/proofreadpage_tests.py:        self.assertRaises(pywikibot.UnknownExtension,
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, ProofreadPage, source)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, ProofreadPage, source)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, ProofreadPage, source)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, getattr, page, 'url_image')
tests/proofreadpage_tests.py:        self.assertRaises(TypeError, setattr, page, 'index', 'invalid index')
tests/proofreadpage_tests.py:        self.assertRaises(pywikibot.UnknownExtension,
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, IndexPage, source)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, IndexPage, source)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, IndexPage, source)
tests/proofreadpage_tests.py:        self.assertRaises(KeyError, index_page.get_label_from_page_number, -1)
tests/proofreadpage_tests.py:        self.assertRaises(KeyError, index_page.get_label_from_page, None)
tests/proofreadpage_tests.py:        self.assertRaises(KeyError, index_page.get_page_number_from_label,
tests/proofreadpage_tests.py:        self.assertRaises(KeyError, index_page.get_page_from_label, 'dummy label')
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, index_page.page_gen, -1, 2)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, index_page.page_gen, 1, -1)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, index_page.page_gen, 2, 1)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, self.index.page_gen, -1, 2)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, self.index.page_gen, 1, -1)
tests/proofreadpage_tests.py:        self.assertRaises(ValueError, self.index.page_gen, 2, 1)
tests/site_detect_tests.py:        self.assertRaises((AttributeError, ConnectionError, RuntimeError,
tests/site_tests.py:        self.assertRaises(KeyError, mysite.mediawiki_message, "nosuchmessage")
tests/site_tests.py:        self.assertRaises(KeyError, self.site.mediawiki_messages, 'about')
tests/site_tests.py:        self.assertRaises(KeyError, mysite.mediawiki_messages, msg)
tests/site_tests.py:            self.assertRaises(pywikibot.IsNotRedirectPage,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, next, errgen)
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.blocks, total=5,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.blocks,
tests/site_tests.py:        self.assertRaises(pywikibot.site.PageInUse, site.lock_page, page=p1, block=False)
tests/site_tests.py:                with self.assertRaises(NotImplementedError):
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.logevents,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.logevents,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.recentchanges,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.recentchanges,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.usercontribs,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.usercontribs,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.watchlist_revs,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.watchlist_revs,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.deletedrevs,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, mysite.deletedrevs,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, site.protect,
tests/site_tests.py:        self.assertRaises(pywikibot.Error, site.protect,
tests/site_tests.py:        self.assertRaises(pywikibot.NoPage, p.get, force=True)
tests/site_tests.py:        self.assertRaises(pywikibot.Error, lambda x: list(x), mysite.patrol())
tests/site_tests.py:        self.assertRaises(pywikibot.Error, lambda t: self.mysite.tokens[t], "invalidtype")
tests/site_tests.py:        self.assertRaises(KeyError, mysite.siteinfo.__getitem__, not_exists)
tests/site_tests.py:        self.assertRaises(pywikibot.Error, self.mysite.loadrevisions,
tests/site_tests.py:        self.assertRaises(ValueError, self.mysite.loadrevisions,
tests/site_tests.py:        self.assertRaises(ValueError, self.mysite.loadrevisions,
tests/site_tests.py:        self.assertRaises(ValueError, self.mysite.loadrevisions,
tests/site_tests.py:        self.assertRaises(ValueError, self.mysite.loadrevisions,
tests/site_tests.py:        self.assertRaises(ValueError, datasite.search_entities, 'abc',
tests/site_tests.py:        self.assertRaises(KeyError, site.hostname)
tests/site_tests.py:        self.assertRaises(KeyError, site.hostname)
tests/site_tests.py:        self.assertRaises(pywikibot.UnknownSite, pywikibot.Site,
tests/site_tests.py:        self.assertRaises(pywikibot.UnknownSite, pywikibot.Site,
tests/site_tests.py:        self.assertRaises(KeyError, site.family.hostname, 'en')
tests/site_tests.py:        self.assertRaises(pywikibot.UnknownSite,
tests/site_tests.py:        with self.assertRaises(NotImplementedError):
tests/site_tests.py:        self.assertRaises(pywikibot.UnknownExtension, site._cache_proofreadinfo)
tests/site_tests.py:        self.assertRaises(pywikibot.UnknownExtension, lambda x: x.proofread_index_ns, site)
tests/site_tests.py:        self.assertRaises(pywikibot.UnknownExtension, lambda x: x.proofread_page_ns, site)
tests/site_tests.py:        self.assertRaises(pywikibot.UnknownExtension, lambda x: x.proofread_levels, site)
tests/tools_formatter_tests.py:        self.assertRaises(ValueError,
tests/tools_formatter_tests.py:        self.assertRaises(TypeError, formatter.color_format, b'{0}', 'a')
tests/tools_formatter_tests.py:        self.assertRaises(TypeError, formatter.color_format, b'{black}{0}', 'a')
tests/tools_tests.py:        self.assertRaises(StopIteration, next, deduper)
tests/tools_tests.py:        self.assertRaises(StopIteration, next, deduper)
tests/tools_tests.py:        self.assertRaises(StopIteration, next, deduper)
tests/tools_tests.py:        self.assertRaises(StopIteration, next, gen2)
tests/tools_tests.py:        self.assertRaises(StopIteration, next, deduper)
tests/tools_tests.py:        self.assertRaises(StopIteration, next, deduper)
tests/utils.py:        self.cm = self.test_case.assertRaises(APIError, msg=self.msg)
tests/wikibase_tests.py:        with self.assertRaises(NotImplementedError):
tests/wikibase_tests.py:        with self.assertRaises(NotImplementedError):
tests/wikibase_tests.py:        with self.assertRaises(NotImplementedError):
tests/wikibase_tests.py:        with self.assertRaises(NotImplementedError):
tests/wikibase_tests.py:        with self.assertRaises(NotImplementedError):
tests/wikibase_tests.py:        with self.assertRaises(NotImplementedError):

Example: https://gerrit.wikimedia.org/r/#/c/330099/

jayvdb created this task.Dec 29 2016, 11:41 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptDec 29 2016, 11:41 AM
jayvdb updated the task description. (Show Details)Dec 29 2016, 11:48 AM

Change 330099 had a related patch set uploaded (by MtDu):
Replace assertRaises with asserRaisesRegex in family_tests.py

https://gerrit.wikimedia.org/r/330099

jayvdb updated the task description. (Show Details)Jan 2 2017, 5:59 AM

Change 330099 merged by jenkins-bot:
Replace assertRaises with asserRaisesRegex in family_tests.py

https://gerrit.wikimedia.org/r/330099

Change 331141 had a related patch set uploaded (by SacredWKnight):
Replace assertRaises with asserRaisesRegex in tools_tests.py

https://gerrit.wikimedia.org/r/331141

Change 331160 had a related patch set uploaded (by Kenstin):
Replace assertRaises with assertRaisesRegex in bot_tests.py

https://gerrit.wikimedia.org/r/331160

Change 331224 had a related patch set uploaded (by Sn1per):
tests.page_tests: assertRaises => assertRaisesRegex

https://gerrit.wikimedia.org/r/331224

Change 331226 had a related patch set uploaded (by Preus):
Replace assertRaises with assertRaisesRegex in i18n_tests.py

https://gerrit.wikimedia.org/r/331226

Sn1per added a subscriber: Sn1per.Jan 9 2017, 2:25 AM

Side note while working page_tests: tests.page_tests.TestPageDelete.test_delete doesn't seem to run properly for me:

tests: max_retries reduced from 25 to 1
Logging in to test:test as Sn1per@pywikibot
test_delete (tests.page_tests.TestPageDelete)
Test the site.delete and site.undelete method. ... Sleeping for 38.4 seconds, 2017-01-08 17:10:45
Page [[User:Unicodesnowman/DeleteTest]] saved
 39.129s FAIL

======================================================================
FAIL: test_delete (tests.page_tests.TestPageDelete)
Test the site.delete and site.undelete method.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gmon/devel/pywikibot-core/tests/page_tests.py", line 897, in test_delete
    self.assertEqual(p.isRedirectPage(), True)
AssertionError: False != True

----------------------------------------------------------------------
Ran 1 test in 41.386s

FAILED (failures=1)

I think the page edit fails because the edits involved in the test do not show up on the testwiki end.

Change 331226 abandoned by Preus:
Replace assertRaises with assertRaisesRegex in i18n_tests.py

https://gerrit.wikimedia.org/r/331226

Change 331396 had a related patch set uploaded (by Preus):
Replace assertRaises with assertRaisesRegex in ui_options_tests.py

https://gerrit.wikimedia.org/r/331396

Change 331396 merged by jenkins-bot:
Replace assertRaises with assertRaisesRegex in ui_options_tests.py

https://gerrit.wikimedia.org/r/331396

Change 331160 merged by jenkins-bot:
Replace assertRaises with assertRaisesRegex in bot_tests.py

https://gerrit.wikimedia.org/r/331160

Change 331601 had a related patch set uploaded (by Divadsn):
Replace assertRaises with assertRaisesRegex in http_tests.py

https://gerrit.wikimedia.org/r/331601

Change 331141 merged by jenkins-bot:
Replace assertRaises with asserRaisesRegex in tools_tests.py

https://gerrit.wikimedia.org/r/331141

Change 331601 merged by jenkins-bot:
Replace assertRaises with assertRaisesRegex in http_tests.py

https://gerrit.wikimedia.org/r/331601

Change 331913 had a related patch set uploaded (by Awu42):
Replace assertRaises with assertRaisesRegex in mediawikiversion_tests.py

https://gerrit.wikimedia.org/r/331913

Change 331913 merged by jenkins-bot:
Replace assertRaises with assertRaisesRegex in mediawikiversion_tests.py

https://gerrit.wikimedia.org/r/331913

Change 331224 merged by jenkins-bot:
tests.page_tests: assertRaises => assertRaisesRegex

https://gerrit.wikimedia.org/r/331224

Change 342325 had a related patch set uploaded (by Dalba):
[pywikibot/core] interwikidata_tests.py: Do not change config while performing tests

https://gerrit.wikimedia.org/r/342325

Change 342325 merged by jenkins-bot:
[pywikibot/core] interwikidata_tests.py: Do not change config while performing tests

https://gerrit.wikimedia.org/r/342325

Dalba triaged this task as Low priority.May 5 2017, 3:34 AM
Xqt closed this task as Resolved.Jul 2 2017, 3:25 PM
Xqt claimed this task.
jayvdb reopened this task as Open.Oct 23 2017, 6:19 AM

This is not complete, and is suitable for GCI 2017

jayvdb claimed this task.Oct 23 2017, 6:19 AM
jayvdb updated the task description. (Show Details)
jayvdb added a subscriber: Xqt.
MtDu added a subscriber: MtDu.Oct 23 2017, 12:21 PM

@jayvdb I could help mentor this. Is the list above updated?

jayvdb renamed this task from Replace assertRaises with assertRaisesRegex to [recurring] Replace assertRaises with assertRaisesRegex.Oct 28 2017, 3:18 AM
jayvdb added a comment.EditedOct 28 2017, 3:20 AM

Yup you can mentor it, and I've updated the list.
Can just copy https://codein.withgoogle.com/dashboard/tasks/6553516124405760/
Archived at https://codein.withgoogle.com/archive/2016/organization/5709875686408192/task/4728573235560448/ (strange it is a different task ID)

Change 393990 had a related patch set uploaded (by Rafidaslam; owner: rafid):
[pywikibot/core@master] Change assertRaises to assertRaisesRegex in tests/file_tests.py

https://gerrit.wikimedia.org/r/393990

Change 394520 had a related patch set uploaded (by Rafidaslam; owner: rafid):
[pywikibot/core@master] Change to use assertRaisesRegex in link_tests.py

https://gerrit.wikimedia.org/r/394520

Change 394520 merged by jenkins-bot:
[pywikibot/core@master] Change to use assertRaisesRegex in link_tests.py

https://gerrit.wikimedia.org/r/394520

Change 393990 merged by jenkins-bot:
[pywikibot/core@master] Change to use assertRaisesRegex in file_tests.py

https://gerrit.wikimedia.org/r/393990

Change 396576 had a related patch set uploaded (by Divadsn; owner: Divadsn):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in category_tests.py

https://gerrit.wikimedia.org/r/396576

Change 396576 merged by jenkins-bot:
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in category_tests.py

https://gerrit.wikimedia.org/r/396576

Change 396589 had a related patch set uploaded (by Divadsn; owner: Divadsn):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in namespace_tests.py

https://gerrit.wikimedia.org/r/396589

Change 396589 merged by jenkins-bot:
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in namespace_tests.py

https://gerrit.wikimedia.org/r/396589

Change 399134 had a related patch set uploaded (by Ryan10145; owner: Ryan10145):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in isbn_tests.py

https://gerrit.wikimedia.org/r/399134

Change 399202 had a related patch set uploaded (by Clockery; owner: Clockery):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in login_tests.py

https://gerrit.wikimedia.org/r/399202

Change 399202 merged by jenkins-bot:
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in login_tests.py

https://gerrit.wikimedia.org/r/399202

Change 399134 merged by jenkins-bot:
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in isbn_tests.py

https://gerrit.wikimedia.org/r/399134

Change 399348 had a related patch set uploaded (by Xqt; owner: Ryan10145):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in isbn_tests.py

https://gerrit.wikimedia.org/r/399348

Change 399399 had a related patch set uploaded (by Clockery; owner: cf):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in flow_tests.py

https://gerrit.wikimedia.org/r/399399

Change 404085 had a related patch set uploaded (by Divadsn; owner: Divadsn):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in isbn_tests.py

https://gerrit.wikimedia.org/r/404085

divadsn updated the task description. (Show Details)Jan 13 2018, 5:31 PM
divadsn updated the task description. (Show Details)

Change 404085 merged by jenkins-bot:
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in isbn_tests.py

https://gerrit.wikimedia.org/r/404085

Change 404285 had a related patch set uploaded (by Clockery; owner: cf):
[pywikibot/core@master] Replace assertRaises with assertRaisesRegex in api_tests.py

https://gerrit.wikimedia.org/r/404285

Change 399348 abandoned by Dalba:
Replace assertRaises with assertRaisesRegex in isbn_tests.py

Reason:
9a13055ce9c130d832ebd273681e7bf4d5dd71a7

https://gerrit.wikimedia.org/r/399348

Change 399348 restored by Dalba:
Replace assertRaises with assertRaisesRegex in isbn_tests.py

Reason:
T185317

https://gerrit.wikimedia.org/r/399348