コード例 #1
0
ファイル: test_textlib.py プロジェクト: moleculea/ess
 def test_interwikiFormat(self):
     interwikis = {
        'de':pywikibot.Page(self.site_de, 'German'),
        'fr':pywikibot.Page(self.site_fr, 'French')
     }
     self.assertEqual(self.iwresult1,
                      textlib.interwikiFormat(interwikis, self.site))
コード例 #2
0
 def test_interwiki_format(self):
     interwikis = {
         'de': pywikibot.Page(pywikibot.Link('de:German')),
         'fr': pywikibot.Page(pywikibot.Link('fr:French'))
     }
     self.assertEqual(
         '[[de:German]]%(LS)s[[fr:French]]%(LS)s' % {'LS': config.LS},
         textlib.interwikiFormat(interwikis, self.site))
コード例 #3
0
 def test_interwiki_format(self):
     interwikis = {
         "de": pywikibot.Page(pywikibot.Link("de:German", self.site)),
         "fr": pywikibot.Page(pywikibot.Link("fr:French", self.site)),
     }
     self.assertEqual(
         "[[de:German]]%(LS)s[[fr:French]]%(LS)s" % {"LS": config.LS}, textlib.interwikiFormat(interwikis, self.site)
     )
コード例 #4
0
ファイル: textlib_tests.py プロジェクト: xZise/pywikibot-core
 def test_interwiki_format(self):
     interwikis = {
         'de': pywikibot.Page(pywikibot.Link('de:German', self.site)),
         'fr': pywikibot.Page(pywikibot.Link('fr:French', self.site))
     }
     self.assertEqual('[[de:German]]%(LS)s[[fr:French]]%(LS)s'
                      % {'LS': config.LS},
                      textlib.interwikiFormat(interwikis, self.site))
コード例 #5
0
ファイル: textlib_tests.py プロジェクト: MKaras93/pywikibot
 def test_interwiki_format(self):
     """Test formatting interwiki links using Page instances."""
     interwikis = {
         'de': pywikibot.Page(pywikibot.Link('de:German', self.site)),
         'fr': pywikibot.Page(pywikibot.Link('fr:French', self.site))
     }
     self.assertEqual(
         '[[de:German]]%(LS)s[[fr:French]]%(LS)s' % {'LS': config.LS},
         textlib.interwikiFormat(interwikis, self.site))