Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-python

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-python

Jest runner for python

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

jest-python

A jest runner for executing python tests.

expo runner

  • Setup
      - Install
      - Requirements
  • Run
      - Running tests
      - Running with pipenv
  • Demonstration config

Setup

Install

Install with yarn or npm

yarn add --dev jest-python
npm install --save-dev jest-python

Requirements

Python dependencies

Install via pip/pip3

python3
pytest
pytest-json-report
Node dependencies

Install via yarn (or npm)

yarn add --dev jest
npm install --save-dev jest

Add jest-python as the jest runner

In your package.json

"jest": {
    "runner": "jest-python",
    "testMatch": [
      "**/test_*.py"
    ],
    "moduleFileExtensions": [
      "py"
    ]
  }

Run

Run Jest

yarn jest

Run with pipenv

You can run tests in a pipenv shell.

In the project root create a .env file.

Add a variable VIRTUALENV assigned to the absolute path to the pipfile you wish to source.

VIRTUALENV=/Users/kai/projects/test-jest/Pipfile

Demonstration config

Extra dependencies

jest-watch-typeahead

yarn add --dev jest-watch-typeahead
Config used
"jest": {
    "runner": "jest-python",
    "watchPlugins": [
      "jest-watch-typeahead/filename",
      "jest-watch-typeahead/testname"
    ],
    "testMatch": [
      "**/test_*.py"
    ],
    "moduleFileExtensions": [
      "py"
    ]
  }```

FAQs

Package last updated on 15 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc