beeware / cricket

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

Tests not populated in tree view - Windows 7 #77

Open chrisdono opened 5 years ago

chrisdono commented 5 years ago

I installed cricket 0.3.0. OS is windows 7. I run cricket-pytest from a directory with multiple test files. The cricket window pops up but no tests are populated in the tree view. It is empty.

Below are errors from the command prompt. image

image

oleg-sedletskyi commented 5 years ago

Hi I have the same issue, here is some more info: Installing cricket from git by pip install git+https://github.com/pybee/cricket.git pythonnet failed to install from the repository, so I installed it from the git as well: pip install git+https://github.com/pythonnet/pythonnet.git after that installation of the cricket went well and here is a pip freeze:

atomicwrites==1.3.0
attrs==19.1.0
colorama==0.4.1
cricket==0.3.0.dev1
more-itertools==6.0.0
pluggy==0.9.0
py==1.8.0
pytest==4.3.1
pythonnet==2.4.0.dev0
six==1.12.0
toga==0.3.0.dev11
toga-core==0.3.0.dev11
toga-winforms==0.3.0.dev11
travertino==0.1.2

Python version: 3.7.2, Windows 7, 64bit However while starting ckicket-pytest I got the following error:

  File "c:\users\visualstudio\documents\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'

I saw the same error on the MacOS and the fix was to replace toga.font with `'toga.fonts' in \cricket\view.py", line 14. Actually on the MacOS this was the only manual step to make cricket work and run pytest tests.

So I did the same on the Windows machine and after that I was able to launch the program. I added basic test file test_basic_tests.py with the content:

def test_simple_pass():
    assert True

def test_fail():
    assert False

And after starting the cricket-pytest I got the following information in the console:

(3.7.2) C:\Users\USER\Documents\venvs\3.7.2\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()
[Winforms] No valid icon format available for c:\users\USER\documents\venvs\3.7.2\lib\site-packages\cricket\icon
s/cricket; fall back on Tiberius instead

Screenshot from 2019-03-24 10-55-59

On the bottom line it shows that there are 2 tests discovered, but they are not shown in the application.

Am I missing something or this is not supposed to work on the windows system?

I'm going to give an another try on the Win10 system and add more info then. Actually I was very happy to see that cricket-pytest worked on my MacOS system, however it is required to launch tests on the Windows system.

@freakboy3742 Thanks a lot in advance for any feedback.