Skip to content

Commit

Permalink
do not try pywikibot in public CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Sep 27, 2024
1 parent 7aaeea1 commit de49dac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions tests/test_smw_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@ def testGetConcept(self):
def getSMWs(self, wikiId="smwcopy",debug:bool=False):
"""get the alternative SMW access instances for the given wiki id"""
wikiuser = self.getSMW_WikiUser(wikiId)
wikibot = WikiBot.ofWikiUser(wikiuser,debug=debug)
if not self.inPublicCI():
wikibot = WikiBot.ofWikiUser(wikiuser,debug=debug)
smwbot = SMWBot(wikibot.site)
wikiclient = WikiClient.ofWikiUser(wikiuser,debug=debug)
smwbot = SMWBot(wikibot.site)
# https://github.com/wikimedia/pywikibot/blob/master/pywikibot/config.py#L719
smwclient = SMWClient(wikiclient.getSite())
return [smwbot, smwclient]
if self.inPublicCI():
return [smwclient]
else:
return [smwbot, smwclient]

def testGetEvents(self):
"""text for issue #6 https://github.com/WolfgangFahl/py-3rdparty-mediawiki/issues/6"""
Expand Down
3 changes: 2 additions & 1 deletion wikibot3rd/wikibot.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ def __init__(
o = urlparse(self.url)
self.scheme = o.scheme
self.netloc = o.netloc
msg=f"netloc for family {self.family} is {self.netloc} derived from url {self.url}"
if self.debug:
print(f"netloc for family {self.family} is {self.netloc}")
print(msg)
self.scriptPath = o.path + self.scriptPath
self.checkFamily()
if withLogin:
Expand Down

0 comments on commit de49dac

Please sign in to comment.