andreikop / qutepart

Code editor component for PyQt5
http://enki-editor.org
GNU Lesser General Public License v2.1
113 stars 29 forks source link

Test failures with Python 3.9 #86

Closed rapgro closed 4 years ago

rapgro commented 4 years ago
+ xvfb-run -s '-screen :0 1024x768x16' /usr/bin/python3 -m unittest -vvv test_actions.py test_api.py test_bookmarks.py test_bracket_hlighter.py test_completion.py test_draw_whitespace.py test_edit.py 
test_indent.py test_indenter test_rectangular_selection.py test_syntax
test_1 (test_actions.Print) ... skipped 'Does not work'
test_completion_enabled (test_api.Completion) ... /builddir/build/BUILD/qutepart-3.3.0/qutepart/margins.py:78: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self.update(0, rect.y(), self.width(), rect.height() + blockHeight)
/builddir/build/BUILD/qutepart-3.3.0/qutepart/htmldelegate.py:83: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  return QSize(doc.idealWidth(),
/builddir/build/BUILD/qutepart-3.3.0/qutepart/completer.py:233: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  return QSize(width, height)
ok
test_threshold (test_api.Completion) ... ok
test_1 (test_api.DetectSyntax) ... ERROR
test_1 (test_api.InsertText) ... ok
test_2 (test_api.InsertText) ... ok
test_3 (test_api.InsertText) ... ok
test_1 (test_api.IsCodeOrComment) ... ERROR
test_2 (test_api.IsCodeOrComment) ... ERROR
test_block_comment (test_api.IsCodeOrComment) ... ERROR
test_here_doc (test_api.IsCodeOrComment) ... /builddir/build/BUILD/qutepart-3.3.0/qutepart/indenter/ruby.py:241: DeprecationWarning: invalid escape sequence \s
  self.testAtEnd(prevStmt, re.compile(',\s*'))
/usr/bin/xvfb-run: line 181:   457 Aborted                 (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
error: Bad exit status from /var/tmp/rpm-tmp.4daIdx (%check)

I guess the error happens somewhere inside the detectSyntax method. https://github.com/andreikop/qutepart/blob/38adbc2269a5525322688e92c5ef1967ace31f68/qutepart/__init__.py#L765

rapgro commented 4 years ago

This issue isn't reproducible with Python 3.8

andreikop commented 4 years ago

@rapgro, just disable the tests. I can not stabilize this chaos.

rapgro commented 4 years ago

@andreikop Too bad but thanks anyway for looking into.

andreikop commented 4 years ago

@rapgro , I'm working on the problem. Tests are absolutely stable here

rapgro commented 4 years ago

Why did you fork your own work?

rapgro commented 4 years ago

As a contributor in Fedora, I'm trying to get some help from the maintainers of PyQt5.

andreikop commented 4 years ago

I'm fixing this bug. And some others.