A nimble testing tool
Project description
Testloop
A nimble testing tool
Usage
$ python testloop.py
[Wed Nov 30 20:34:50 2022] Running: python /home/jskulski/Code/jskulski/testloop/testloop.py test .
testloop: cwd=/home/jskulski/Code/jskulski/testloop
testloop: running test_command=`pytest -v --pdb --pdbcls=IPython.terminal.debugger:TerminalPdb -s tests/`
======================================= test session starts =======================================
platform linux -- Python 3.11.0, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/jskulski/Code/jskulski/ballooning
plugins: cov-2.12.1, asyncio-0.20.2, syrupy-3.0.5, time-machine-2.8.2, anyio-3.6.2, aiohttp-1.0.4
asyncio: mode=Mode.STRICT
collected 9 items / 2 deselected / 7 selected
tests/test_initial_design_sprint.py s...... [100%]
------------------------------------- snapshot report summary -------------------------------------
=========================== 6 passed, 1 skipped, 2 deselected in 0.04s ============================
testloop.py: reads itself for configuration, builds a pytest command and runs it when files change
Running python testloop.py starts a filewatcher that runs pytest
When a file changes:
testloopreads itself for pytest options- builds a pytest command from those options
- runs that pytest command and reports results
testloop.py contains option dictionaries:
You can comment/uncomment/modify these options to trigger a new test run. Changing your source code will also trigger a new run.
pytest_opts = dict(
# match='-k test_logs_when_both_repo_and_failsafe_fail_to_persist',
# last_failed="--lf",
dbg="--pdb --pdbcls=IPython.terminal.debugger:TerminalPdb",
use_settrace="-s",
# coverage="--cov=lib/history --cov-report term",
)
Note, the initial run of testloop will install dependencies at runtime.
Design
Testloop is a nimble developement testing tool.
Nimble development tools are designed to be:
- "Good enough" development tools available across the containerized divide.
- at-hand, easy to install, even on the most alpine of docker containers
- simple in function
- complex in features
- self contained configuration, effectively stateless
- self-installing dependencies allow for an unfolding feature set
Changelog
v 0.1.0
- create readme, package and publish
- testloop in a working state (read self for config, watches files, runs pytest)
- add a test for testloop
v 0.1.1
- adding CLI script, pre-commits
- updating pypi page
Current
v 0.1.5
- testloop executable script
- how do we handle configuration if we install via pip?
- fix PATHING
Future
v 0.2.0
-
handle project environments venv activation (setup step?)
-
direct skul.ski to a hosting service, update install doc
-
system binary
testloopif installed via pip -
cli options to turn on/off dependencies
-
add pudb option, build configurations as object
-
tui / gui / editor integrations
-
create system-wide venv for dependencies OR consider rewriting as an executable + config
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file testloop-0.1.1.tar.gz.
File metadata
- Download URL: testloop-0.1.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.11.0 Linux/6.0.6-76060006-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3485abc2599daf44e20426340fe09ac3f8f0879db444ed199393607ca0380ad1
|
|
| MD5 |
f8d7e59c1e96be4e63e75c880de57685
|
|
| BLAKE2b-256 |
d34528fc805727e988ef56ce33138ddb520c98a4876ca91619819f03b536759a
|
File details
Details for the file testloop-0.1.1-py3-none-any.whl.
File metadata
- Download URL: testloop-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.11.0 Linux/6.0.6-76060006-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3525e8dc67b647b9dee63607d55cd6312421aac92fb31d93e2aba76ffb6ff22
|
|
| MD5 |
0cd819c0339de28ee4a9bc6920ed6321
|
|
| BLAKE2b-256 |
854197b093fad1f0d9d740e2cbd67205bb3c4602ad38c38fb88333318bffd004
|