Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
.. image:: https://travis-ci.org/gowtham-sai/pytest-pspec.svg?branch=master :target: https://travis-ci.org/gowtham-sai/pytest-pspec
.. image:: https://codecov.io/gh/gowtham-sai/pytest-pspec/branch/master/graph/badge.svg :target: https://codecov.io/gh/gowtham-sai/pytest-pspec
A pspec format
_ reporter for pytest
.. _pspec format: https://en.wikipedia.org/wiki/RSpec
.. image:: https://i.imgur.com/cCMJXHe.png
::
pip install pytest-pspec
Add the parameter --pspec
when running pytest
. Ex:
::
pytest --pspec your-tests/
Tip: If you don't want to type --pspec
every time you run pytest
, add it
to addopts <https://docs.pytest.org/en/latest/customize.html#confval-addopts>
_
in your ini file <https://docs.pytest.org/en/latest/customize.html#initialization-determining-rootdir-and-inifile>
_. Ex:
.. code-block:: ini
# content of pytest.ini
# (or tox.ini or setup.cfg)
[pytest]
addopts = --pspec
Add the doc strings Ex:
.. code-block:: python
import unittest
class TestWayTwo(unittest.TestCase):
"Pspec Python TDD"
def test_should_add(self):
"it adds two integers and returns integer"
self.assertEqual(2+2, 4)
def test_should_find_difference_between_integers(self):
self.assertEqual(4-2, 2)
running pytest --pspec
outputs
.. code-block::
demo
✓ it adds two integers and returns integer
✓ should find difference between integers
pspec_format
Specifies pspec report format, ``plaintext`` or ``utf8`` (default:
``utf8``). Ex:
.. code:: ini
# content of pytest.ini
# (or tox.ini or setup.cfg)
[pytest]
pspec_format = plaintext
::
$ pytest test_demo.py
============================= test session starts ==============================
platform darwin -- Python 3.5.0, pytest-3.0.7, py-1.4.33, pluggy-0.4.0
rootdir: /private/tmp/demo, inifile: pytest.ini
plugins: pspec-dev
collected 2 items
test_demo.py
Pytest pspec
[x] prints a BDD style output to your tests
[x] lets you focus on the behavior
FAQs
A rspec format reporter for Python ptest
We found that pytest-pspec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.