Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in test suite #582

Closed
5 tasks done
rahulporuri opened this issue Jul 15, 2020 · 2 comments · Fixed by #965
Closed
5 tasks done

Fix warnings in test suite #582

rahulporuri opened this issue Jul 15, 2020 · 2 comments · Fixed by #965
Labels
component: test suite Issues related to testing, test support, test interactions... difficulty: easy Issues which don't need much/any context about the package.

Comments

@rahulporuri
Copy link
Contributor

rahulporuri commented Jul 15, 2020

There is a good amount of noise in the testsuite output, some of which are deprecations which we will want to fix and some of which are non-issues which we can't do anything about.

  • pyface\tasks\tests\test_editor_area_pane.py:27: DeprecationWarning: Please use assertTrue instead. self.assert_(isinstance(area.create_editor(0), Editor))
  • pyface\tasks\tests\test_topological_sort.py:84: DeprecationWarning: Please use assertTrue instead. self.assert_(not has_cycles)
  • pyface\qt\QtScript.py:18: DeprecationWarning: QtScript is not supported in PyQt5 warnings.warn(DeprecationWarning("QtScript is not supported in PyQt5"))
  • pyface.ui.qt4.tests.test_message_dialog.TestMessageDialog.test_escape_button_no_details: ResourceWarning: unclosed file<_io.BufferedRandom name='C:\Users\rporuri\AppData\Local\Temp\file0'>, unclosed file <_io.BufferedRandom name='C:\Users\rporuri\AppData\Local\Temp\file1'>, unclosed file <_io.BufferedRandom name='C:\Users\rporuri\AppData\Local\Temp\file2'>
  • test_combo_field_icon_formatter (pyface.fields.tests.test_combo_field.TestComboField) ... C:\Users\rporuri.edm\envs\pyface-test-3.6-pyqt5\lib\site-packages\pkg_resources_init_.py:1157: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release. (see ImageResource locate image triggers deprecation warning #587 )
Full test output below
>python -m unittest discover pyface
......................................................................................Did not find name 'fallback' on <pyface.action.tests.test_listening_action.WatchedObject object at 0x0000011C47861A98>
........C:\Users\rporuri\.edm\envs\pyface-release-test\lib\site-packages\traitsui\ui_traits.py:56: DeprecationWarning: 'TraitPrefixList' trait handler has been deprecated. Use PrefixList instead.
  Orientation = Trait("vertical", TraitPrefixList("vertical", "horizontal"))
C:\Users\rporuri\.edm\envs\pyface-release-test\lib\site-packages\traitsui\ui_traits.py:60: DeprecationWarning: 'TraitPrefixList' trait handler has been deprecated. Use PrefixList instead.
  "simple", TraitPrefixList("simple", "custom", "text", "readonly"), cols=4
C:\Users\rporuri\.edm\envs\pyface-release-test\lib\site-packages\traitsui\ui_traits.py:65: DeprecationWarning: 'TraitPrefixList' trait handler has been deprecated. Use PrefixList instead.
  "normal", TraitPrefixList("normal", "split", "tabbed", "flow", "fold")
C:\Users\rporuri\.edm\envs\pyface-release-test\lib\site-packages\traitsui\editors\api.py:15: ImportWarning: ArrayEditor is not available due to missing numpy
  "ArrayEditor is not available due to missing numpy", ImportWarning
C:\Users\rporuri\.edm\envs\pyface-release-test\lib\site-packages\traitsui\view.py:121: DeprecationWarning: 'TraitPrefixList' trait handler has been deprecated. Use PrefixList instead.
  "wizard",
C:\Users\rporuri\.edm\envs\pyface-release-test\lib\site-packages\traits\traits.py:330: DeprecationWarning: 'TraitMap' trait handler has been deprecated. Use Map instead.
  other.append(TraitMap(map))
.......C:\Users\rporuri\.edm\envs\pyface-release-test\lib\site-packages\pkg_resources\__init__.py:1157: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release.
  self, resource_name
...............................C:\Users\rporuri\work\github\ets\pyface\pyface\tasks\tests\test_editor_area_pane.py:27: DeprecationWarning: Please use assertTrue instead.
  self.assert_(isinstance(area.create_editor(0), Editor))
..ssssss..........................C:\Users\rporuri\work\github\ets\pyface\pyface\tasks\tests\test_topological_sort.py:84: DeprecationWarning: Please use assertTrue instead.
  self.assert_(not has_cycles)
.............---- ApplicationExit raised ----
Traceback (most recent call last):
  File "C:\Users\rporuri\work\github\ets\pyface\pyface\application.py", line 174, in run
    run = self._run()
  File "C:\Users\rporuri\work\github\ets\pyface\pyface\tests\test_application.py", line 72, in _run
    raise ApplicationExit("error message")
pyface.application.ApplicationExit: error message
..Error preparing for application exit
Traceback (most recent call last):
  File "C:\Users\rporuri\work\github\ets\pyface\pyface\application.py", line 215, in exit
    self._prepare_exit()
  File "C:\Users\rporuri\work\github\ets\pyface\pyface\tests\test_application.py", line 84, in _prepare_exit
    raise Exception("Exit preparation failed")
Exception: Exit preparation failed
............QWindowsWindow::setGeometry: Unable to set geometry 100x100+960+455 (frame: 118x147+951+417) on QWidgetWindow/"ApplicationWindowWindow" on "\\.\DISPLAY1". Resulting geometry: 148x100+960+455 (frame: 166x147+951+417) margins: 9, 38, 9, 9)
...............s...ssss.ssss............s..ss.s.s.......s..s..sss...................Error preparing for application exit
Traceback (most recent call last):
  File "C:\Users\rporuri\work\github\ets\pyface\pyface\application.py", line 215, in exit
    self._prepare_exit()
  File "C:\Users\rporuri\work\github\ets\pyface\pyface\tests\test_gui_application.py", line 105, in _prepare_exit
    raise Exception("Exit preparation failed")
Exception: Exit preparation failed
...........................ss........ss.s..........s....s...............................................................................................................................ssss..s..s...QWindowsWindow::setGeometry: Unable to set geometry 100x100+960+455 (frame: 118x147+951+417) on QWidgetWindow/"QMainWindowClassWindow" on "\\.\DISPLAY1". Resulting geometry: 148x100+960+455 (frame: 166x147+951+417) margins: 9, 38, 9, 9)
.......s......................................C:\Users\rporuri\work\github\ets\pyface\pyface\ui\qt4\util\gui_test_assistant.py:71: ResourceWarning: unclosed file <_io.BufferedRandom name='C:\\Users\\rporuri\\AppData\\Local\\Temp\\file0'>
  if not gc.collect():
C:\Users\rporuri\work\github\ets\pyface\pyface\ui\qt4\util\gui_test_assistant.py:71: ResourceWarning: unclosed file <_io.BufferedRandom name='C:\\Users\\rporuri\\AppData\\Local\\Temp\\file1'>
  if not gc.collect():
C:\Users\rporuri\work\github\ets\pyface\pyface\ui\qt4\util\gui_test_assistant.py:71: ResourceWarning: unclosed file <_io.BufferedRandom name='C:\\Users\\rporuri\\AppData\\Local\\Temp\\file2'>
  if not gc.collect():
..C:\Users\rporuri\work\github\ets\pyface\pyface\ui\qt4\mimedata.py:66: RuntimeWarning: Could not pickle dragged object <function PyMimeDataTestCase.test_cant_pickle.<locals>.<lambda> at 0x0000011C47B85AE8>, using application/x-ets-qt4-instance-no-pickle mimetype instead
  RuntimeWarning,
.........C:\Users\rporuri\work\github\ets\pyface\pyface\ui\qt4\mimedata.py:66: RuntimeWarning: Could not pickle dragged object <function PyMimeDataTestCase.test_coerce_unpicklable.<locals>.<lambda> at 0x0000011C47B85AE8>, using application/x-ets-qt4-instance-no-pickle mimetype instead
  RuntimeWarning,
..................C:\Users\rporuri\work\github\ets\pyface\pyface\qt\QtScript.py:18: DeprecationWarning: QtScript is not supported in PyQt5
  warnings.warn(DeprecationWarning("QtScript is not supported in PyQt5"))
E........ssssssssssssss.....
@rahulporuri rahulporuri changed the title Noise when running the test suite Fix deprecations in test suite Jul 15, 2020
@rahulporuri rahulporuri changed the title Fix deprecations in test suite Fix warnings in test suite Jul 17, 2020
@rahulporuri rahulporuri added the component: test suite Issues related to testing, test support, test interactions... label Jul 17, 2020
@rahulporuri
Copy link
Contributor Author

#526 and #527 reported parts of these earlier

@aaronayres35 aaronayres35 self-assigned this Jul 17, 2020
@kitchoi
Copy link
Contributor

kitchoi commented Jul 17, 2020

Oops, sorry I just noticed that #587 duplicates part of this. Please feel free to close that one as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: test suite Issues related to testing, test support, test interactions... difficulty: easy Issues which don't need much/any context about the package.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants