Page MenuHomePhabricator

pywikibot-wiktionary tests are generally failing
Closed, DeclinedPublic

Description

$ ./testall.sh 
...F
======================================================================
FAIL: testReprSanity (__main__.KnownValues)
Header __repr__, __eq__, __ne__ should give sane results
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./headertest.py", line 52, in testReprSanity
    self.assertNotEqual(h, header.Header())
AssertionError: header.Header(contents='en', header='english', level=2, type='lang') == <header.Header object at 0x10fcbcb90>

----------------------------------------------------------------------
Ran 4 tests in 0.001s

FAILED (failures=1)
This line doesn't seem to contain an indication of the language: *Russian: [[шесток]] ''m'' (shestok)
E
======================================================================
ERROR: testParser (__main__.KnownValues)
self.term, self.gender, self.number, self.diminutive and remark
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./meaningtest.py", line 58, in testParser
    termlang]['alltrans'][i]['trans']
KeyError: 'ru'

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
.FFF
======================================================================
FAIL: testTermKnownValuesWikiWrapAsExample (__main__.KnownValues)
WikiWrap output correct for a term used as an example
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./termtest.py", line 31, in testTermKnownValuesWikiWrapAsExample
    self.assertEqual(asexample, result)
AssertionError: "'''example'''" != u"'''en'''"

======================================================================
FAIL: testTermKnownValuesWikiWrapAsTranslation (__main__.KnownValues)
WikiWrap output correct for a term when used as a translation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./termtest.py", line 53, in testTermKnownValuesWikiWrapAsTranslation
    self.assertEqual(forlist, result)
AssertionError: '[[example]]' != '[[en]]'

======================================================================
FAIL: testTermKnownValuesWikiWrapForList (__main__.KnownValues)
WikiWrap output correct for a term when used in a list
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./termtest.py", line 42, in testTermKnownValuesWikiWrapForList
    self.assertEqual(forlist, result)
AssertionError: '[[example]]' != '[[en]]'

----------------------------------------------------------------------
Ran 4 tests in 0.001s

FAILED (failures=3)
.number of meanings: 1
number of meanings: 1
number of meanings: 1
number of meanings: 1
number of meanings: 1
E
======================================================================
ERROR: testWhetherTranslationsAreParsedProperly (__main__.TestKnownValuesInParser)
Test whether translations are parsed properly
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./wiktionarypagetest.py", line 509, in testWhetherTranslationsAreParsedProperly
    apage.parseWikiPage(value['wikiformat'])
  File "/Users/km/projects/pywikibot-wiktionary/wiktionarypage.py", line 441, in parseWikiPage
    winner.parseTranslations(line)
AttributeError: 'bool' object has no attribute 'parseTranslations'

----------------------------------------------------------------------
Ran 2 tests in 0.072s

FAILED (errors=1)

Version: unspecified
Severity: normal

Details

Reference
bz68348

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:36 AM
bzimport added a project: Pywikibot-tests.
bzimport set Reference to bz68348.
bzimport added a subscriber: Unknown Object (????).
jayvdb added a project: Pywikibot-compat.
jayvdb set Security to None.

TestMe if tests work in new repo. If so, this bug can be closed

Xqt subscribed.

Declined due to decommission compat