beeware / cricket

A GUI tool for running Python test suites.
BSD 3-Clause "New" or "Revised" License
213 stars 68 forks source link

cricket-pytest Windows 10 "Unhandled Exception: Python.Runtime.PythonException: SystemExit : 1" #81

Open oleg-sedletskyi opened 5 years ago

oleg-sedletskyi commented 5 years ago

Hi I'm trying to launch criket-pytest on Win10 system and facing the following issue (tried with the empty tests folder and with the tests within it):

(3.7.2) C:\Projects\venvs\tests>cricket-pytest
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: TextInput.set_font()
[Winforms] Not implemented: MultilineTextInput.set_placeholder()
[Winforms] Not implemented: MultilineTextInput.set_placeholder()
[Winforms] Not implemented: MultilineTextInput.set_placeholder()
[Winforms] Not implemented: Tree.change_source()
[Winforms] Not implemented: Tree.set_on_select()
[Winforms] Not implemented: Tree.set_on_select()
[Winforms] Not implemented: Tree.change_source()
[Winforms] Not implemented: Tree.set_on_select()
[Winforms] Not implemented: Tree.set_on_select()
[Winforms] Not implemented: OptionContainer.set_on_select()
[Winforms] Not implemented: OptionContainer.set_on_select()

Unhandled Exception: Python.Runtime.PythonException: SystemExit : 1
   at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
   at __System_Threading_ThreadStartDispatcher.Invoke()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

I installed pythonnet with pip install git+https://github.com/pythonnet/pythonnet.git and then cricket with: pip install git+https://github.com/pybee/cricket.git After that I had to fix cricket\view.py on line 14, because I got the following error:

  File "c:\projects\venvs\3.7.2\lib\site-packages\cricket\view.py", line 14, in <module>
    from toga.font import BOLD, SANS_SERIF
ModuleNotFoundError: No module named 'toga.font'

The fix was renaming toga.font to toga.fonts.

System: Windows 10 64bit, Python 3.7.2

(3.7.2) C:\Projects\venvs\tests>pip freeze
cricket==0.3.0.dev1
pythonnet==2.4.0.dev0
toga==0.3.0.dev11
toga-core==0.3.0.dev11
toga-winforms==0.3.0.dev11
travertino==0.1.2

On Windows 7 I was able at least to run the application, but the tests were not loaded (more info in https://github.com/pybee/cricket/issues/77 )

Any help will be highly appreciated because cricket seems to be an excellent tool, but I was able to run it only on MacOS so far which is not enough.

freakboy3742 commented 5 years ago

I agree supporting platforms other than macOS would be preferable. We're in the process of migrating Cricket to use Toga (because we've hit the limits of what we can do with Tkinter); but unfortunately, Toga isn't feature complete on Windows and Gtk yet. That's the major reason why Cricket 0.3 has only been released as a development package.