Skip to content

Commit

Permalink
Merge "testBaseMethods: Don't fail when repository code is not found …
Browse files Browse the repository at this point in the history
…in disambcatname"
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Feb 17, 2017
2 parents a468cc0 + 258121d commit 50e39f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/site_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,15 @@ def testBaseMethods(self):
try:
dabcat = mysite.disambcategory()
except pywikibot.Error as e:
self.assertIn('No disambiguation category name found', str(e))
try:
self.assertIn('No disambiguation category name found', str(e))
except AssertionError:
self.assertIn(
'No {repo} qualifier found for disambiguation category '
'name in {fam}_family file'.format(
repo=mysite.data_repository().family.name,
fam=mysite.family.name),
str(e))
else:
self.assertIsInstance(dabcat, pywikibot.Category)

Expand Down

0 comments on commit 50e39f8

Please sign in to comment.