Skip to main content

Pytest, but made easy

The easiest way to test your projects with pytest.

Why?

I had some tests that, when running all together, were failing due to memory issues. This is the way I solved it, and also I can log the results of my tests and clean the tests files folders very easy each time the tests are executed.

Functionality

Simplify the way we do our tests in python and run tests individually to be more accurate (and a bit slower, but is testing, accuracy is more important).

There are 2 tags:

  • mandatory for the tests that must be tested and passed always in order to go on, make a commit or upload a new version.
  • additional for the tests that are validating some optional or experimental functionality that is not needed for a commit or a new version.

You should tests always the mandatory to know that your app base code is still working, even though some experimental features could fail.

Usage

The tests folder will be your new friend. Keep a test_general.py to always do a simple test. Have the conftest.py to configure what has to be done before and after the tests are running.

This will execute the tests and remove all the new files in the test_files folder that were not before the tests were executed, or you can simply comment the test_files_handler.delete_new_files() line before running them, so the generated files are not removed in that execution, uncomment it, and they won't be removed in the next execution because they were already there.

There are some .bat files included to run the tests in 3 different modes:

  1. run_tests.bat - Non-isolated mode, normal mode.
  2. run_tests_isolated.bat - Isolated mode, our way.
  3. run_mandatory_tests.bat - Run only the tests with the @mandatory pytest mark.

Check test_various.py to see more examples.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_easy-0.0.4.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_easy-0.0.4-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pytest_easy-0.0.4.tar.gz.

File metadata

  • Download URL: pytest_easy-0.0.4.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10

File hashes

Hashes for pytest_easy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 70c56d75116b4318e72724d6012e684dfa569dd3217a80cf64791d6f707873dc
MD5 ba87f0b8426f549cd62e0b6e0095e90f
BLAKE2b-256 f2ed692c19febc37be2fcda3911fd4f43d8c573662bf0ed5b9469228b0c6e3a4

See more details on using hashes here.

File details

Details for the file pytest_easy-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pytest_easy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.9.0 Windows/10

File hashes

Hashes for pytest_easy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1fe57a02a41fff03f7508e33485f5303e381aabd73fde4109ef981823e0be4de
MD5 81e6913d94c279fd9fea3c09bcd92457
BLAKE2b-256 c34aa6a3fa6165a1781ff67644f7a2b9ab4cb079bbfd555d6439367cc18b2e68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page