Skip to content

Commit

Permalink
[family] test_family.py was dropped, use wikipedia:test instead
Browse files Browse the repository at this point in the history
Also _ignore_from_url attribute, initially introduced for test_family,
is no longer available

Change-Id: I6cebf48245e386d6dd70793b7955316aa85f0006
  • Loading branch information
xqt committed Jun 10, 2024
1 parent fdcd1cf commit 6a3f282
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pywikibot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class _ConfigurationDeprecationWarning(UserWarning):
# The language code of the site we're working on.
mylang = 'language'
# If family and mylang are not modified from the above, the default is changed
# to test:test, which is test.wikipedia.org, at the end of this module.
# to wikipedia:test, which is test.wikipedia.org, at the end of this module.

# The dictionary usernames should contain a username for each site where you
# have a bot account. Please set your usernames by adding such lines to your
Expand Down
4 changes: 2 additions & 2 deletions tests/edit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_merge_history_validation(self):
},
'Cannot merge revisions from source '
'[[test:User:Sn1per/Nonexistent]] because it does not exist '
'on test:test'
'on wikipedia:test'
),
(
{ # nonexistent dest
Expand All @@ -138,7 +138,7 @@ def test_merge_history_validation(self):
},
'Cannot merge revisions to destination '
'[[test:User:Sn1per/Nonexistent]] because it does not exist '
'on test:test'
'on wikipedia:test'
),
]

Expand Down
8 changes: 3 additions & 5 deletions tests/family_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,9 @@ def test_each_family(self):
family = Family.load(family)
for code in family.codes:
self.current_code = code
url = ('{}://{}{}/$1'.format(family.protocol(code),
family.hostname(code),
family.path(code)))
# Families can switch off if they want to be detected using
# URL. This applies for test:test (there is test:wikipedia)
url = '{}://{}{}/$1'.format(family.protocol(code),
family.hostname(code),
family.path(code))
with self.subTest(url=url):
self.assertEqual(family.from_url(url), code)

Expand Down

0 comments on commit 6a3f282

Please sign in to comment.