Python 3.6 test_minimize_dfa fails

Issue #456 new
Frederik Rietdijk created an issue
=================================== FAILURES ===================================
______________________________ test_minimize_dfa _______________________________
Traceback (most recent call last):
  File "/tmp/nix-build-python3.6-Whoosh-2.7.4.drv-0/Whoosh-2.7.4/tests/test_automata.py", line 355, in test_minimize_dfa
    assert dfa == good
AssertionError: assert <whoosh.automata.fsa.DFA object at 0x7ffff0f22cc0> == <whoosh.automata.fsa.DFA object at 0x7ffff0f22a90>
================= 2 tests deselected by '-knot test_timelimit' =================
============= 1 failed, 558 passed, 2 deselected in 19.45 seconds ==============
builder for ‘/nix/store/28iflv53ph4msv2h40zn07v5i7fck84f-python3.6-Whoosh-2.7.4.drv’ failed with exit code 1

Comments (2)

  1. lambyuk

    This is a non-determinism issue in the NFA.minimize routine:

        dfa.__dict__ = {'initial': 1, 'transitions': {1: {'a': 3, 'b': 2}, 3: {'a': 1}, 2: {'b': 1}}, 'defaults': {}, 'final_states': {1}, 'outlabels': {}}
    
        good.__dict__ = {'initial': 1, 'transitions': {1: {'a': 3, 'b': 2}, 2: {'b': 1}, 3: {'a': 1}}, 'defaults': {}, 'final_states': {1}, 'outlabels': {}}
    

    The __eq__ method could potentially be patched to find them equivalent "anyway" but I'm not sure that is right at all.

    See also: https://bugs.debian.org/897489#19

  2. Log in to comment