jest-community / jest-pytest Goto Github PK
View Code? Open in Web Editor NEWA Jest and Pytest integration made in heaven ๐
Home Page: https://jest-community.github.io/jest-pytest
License: MIT License
A Jest and Pytest integration made in heaven ๐
Home Page: https://jest-community.github.io/jest-pytest
License: MIT License
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.
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!
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"]
};
See https://github.com/jest-community/create-jest-runner
It simplifies a lot of the boilerplate.
If it doesn't fit your needs, it'd be cool to see if we could expand it to work the way you need it to
When there is a top level error jest says " Your test suite must contain at least one test."
Pure pytest shows the import error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.