jest-pytest icon indicating copy to clipboard operation
jest-pytest copied to clipboard

py3 support?

Open csheirer opened this issue 5 years ago • 4 comments

Any plans for Python 3 support? Can't seem to get this tool to run in Python 3.8, never recognizes tests that are recognized when I run successfully in a 2.7 venv

I've got some simple assert tests I'm trying to run that aren't recognized as tests when I run yarn jest

` FAIL tests/assertEqual_test.py ● Test suite failed to run

Your test suite must contain at least one test.

  at onResult (node_modules/@jest/core/build/TestScheduler.js:173:18)
  at node_modules/jest-pytest/lib/index.js:35:101`

The test to which is just a simple

def func(x): return x + 1

def test_ints_equal(): assert func(4) == 5,"false!"

Runs without any complaints when I pass the script through to pytest though. Kinda at my wits end.

csheirer avatar Jul 20 '20 22:07 csheirer

Same problem. https://gitee.com/wind13/jest-pytest-demo

wind13 avatar Jul 28 '20 13:07 wind13

You can get more information by defining the environment variable JEST_PYTEST_DEBUG_IPC=1.

I got it to work with Python 3.8.5 by commenting out the pytest_logwarning method in the pytest_jest/plugin.py file.

sandym avatar Aug 06 '20 12:08 sandym

Commenting out the pytest_logwarning did worked for me as well. But is there any general fix for the problem? The workaround is not possible in a CI/CD pipeline environments.

gattasrikanth avatar Sep 01 '20 12:09 gattasrikanth

With Python2 deprecated, this project is effectively useless. It's a shame. This is a really good idea but there's just no active maintenance.

joshenders avatar Jan 25 '21 23:01 joshenders