Giter Site home page Giter Site logo

jest-community / jest-pytest Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 9.0 9.31 MB

A Jest and Pytest integration made in heaven ๐Ÿ’–

Home Page: https://jest-community.github.io/jest-pytest

License: MIT License

Shell 0.15% JavaScript 0.23% Python 99.12% Makefile 0.15% PowerShell 0.06% Batchfile 0.14% TeX 0.03% HTML 0.08% CSS 0.02% Ruby 0.01% Dockerfile 0.01%
jest pytest python testing

jest-pytest's People

Contributors

jondot avatar look4regev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jest-pytest's Issues

py3 support?

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.

print does not show in console

First of all, love this. Way better than pure python alternatives.

One of the surprising things coming from jest for JS is that the calls to print do not show up in the console. Not sure what would be involved with fixing that, but just thought I'd point that out.

Thanks again!

cannot open jest-pytest.json

Hi, thanks for providing this nice little tool.
I ran into this situation, can you help?

$ jest --config=pyjest.config.js py-code
 FAIL  py-code/test_calculator.py
  โ— Test suite failed to run

    ENOENT: no such file or directory, open '/tmp/c826b58172c7eab3f4e254fda21f53fc.jest-pytest.json'

      Pytest output:
      Error: spawn py.test ENOENT

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.039 s
Ran all test suites matching /py-code/i.

where the pytjext.config.js looks like this:

// pyjest.config.js
module.exports = {
  verbose: true,
  moduleFileExtensions: ["py"],
  runner: "jest-pytest",
  testPathIgnorePatterns: [],
  testMatch: ["**/test_*.py"]
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.