apertium / lttoolbox

Finite state compiler, processor and helper tools used by apertium
http://wiki.apertium.org/wiki/Lttoolbox
GNU General Public License v2.0
18 stars 22 forks source link

tests: callProc asserts, doesn't return – don't depend on return value #181

Closed unhammer closed 8 months ago

unhammer commented 8 months ago

Several failing tests have been silently passing! I haven't had a chance to look at these yet, but it seems like it would just return instead of asserting after compiling the test data (since compiling always returned None and it just stopped there)

unhammer commented 8 months ago

actually I think I see, it needs to return all the way. Me fix.

unhammer commented 8 months ago

======================================================================
FAIL: runTest (lt_paradigm.OrTagRepeatTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiwibird/src/ap/lttoolbox/tests/basictest.py", line 148, in runTest
    self.runTestFlush(tmpd)
  File "/home/kiwibird/src/ap/lttoolbox/tests/lt_paradigm/__init__.py", line 21, in runTestFlush
    self.assertEqual(exp, srt)
AssertionError: 're<vblex><inf>:re\nre<vblex><pret>:ret' != 're<vblex><inf>:re'
- re<vblex><inf>:re
?                  -
+ re<vblex><inf>:re- re<vblex><pret>:ret

======================================================================
FAIL: runTest (lt_paradigm.OrTagTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kiwibird/src/ap/lttoolbox/tests/basictest.py", line 148, in runTest
    self.runTestFlush(tmpd)
  File "/home/kiwibird/src/ap/lttoolbox/tests/lt_paradigm/__init__.py", line 21, in runTestFlush
    self.assertEqual(exp, srt)
AssertionError: 're<vblex><inf>:re\nre<vblex><pret>:ret' != 're<vblex><inf>:re'
- re<vblex><inf>:re
?                  -
+ re<vblex><inf>:re- re<vblex><pret>:ret

@mr-martian you may have to fix these, I'm not familiar with lt-paradigm