changeset 7:d98cb018fad7

add pytest-watcher
author drewp@bigasterisk.com
date Sat, 16 Mar 2024 12:36:13 -0700
parents d885fce5e4e7
children 25538e3ee531
files pdm.lock pretxncommit.sh pyproject.toml
diffstat 3 files changed, 53 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pdm.lock	Sat Mar 16 12:25:20 2024 -0700
+++ b/pdm.lock	Sat Mar 16 12:36:13 2024 -0700
@@ -5,7 +5,7 @@
 groups = ["default", "dev"]
 strategy = ["cross_platform", "inherit_metadata"]
 lock_version = "4.4.1"
-content_hash = "sha256:e3f03dacddc2a6f5d725f9c680e379f7b54dd18c83124526661d6956e525bc76"
+content_hash = "sha256:2dff41a22992283aea0d01ebc12301a09015f812422f1cb9be573613699a74f6"
 
 [[package]]
 name = "aiohttp"
@@ -324,6 +324,20 @@
 ]
 
 [[package]]
+name = "pytest-watcher"
+version = "0.4.1"
+requires_python = ">=3.7.0,<4.0.0"
+summary = "Automatically rerun your tests on file modifications"
+groups = ["dev"]
+dependencies = [
+    "watchdog>=2.0.0",
+]
+files = [
+    {file = "pytest_watcher-0.4.1-py3-none-any.whl", hash = "sha256:29435669cb0124fb32d6de649fe9b1350f6dac94176313fff559ee4c2a66fd6e"},
+    {file = "pytest_watcher-0.4.1.tar.gz", hash = "sha256:5a793c4c883e3a55ab2abbfa3a8cd6fa6495b3767d5f6644052cc5f3236f511a"},
+]
+
+[[package]]
 name = "rdflib"
 version = "7.0.0"
 requires_python = ">=3.8.1,<4.0.0"
@@ -390,6 +404,35 @@
 ]
 
 [[package]]
+name = "watchdog"
+version = "4.0.0"
+requires_python = ">=3.8"
+summary = "Filesystem events monitoring"
+groups = ["dev"]
+files = [
+    {file = "watchdog-4.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8350d4055505412a426b6ad8c521bc7d367d1637a762c70fdd93a3a0d595990b"},
+    {file = "watchdog-4.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c17d98799f32e3f55f181f19dd2021d762eb38fdd381b4a748b9f5a36738e935"},
+    {file = "watchdog-4.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4986db5e8880b0e6b7cd52ba36255d4793bf5cdc95bd6264806c233173b1ec0b"},
+    {file = "watchdog-4.0.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:11e12fafb13372e18ca1bbf12d50f593e7280646687463dd47730fd4f4d5d257"},
+    {file = "watchdog-4.0.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5369136a6474678e02426bd984466343924d1df8e2fd94a9b443cb7e3aa20d19"},
+    {file = "watchdog-4.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:76ad8484379695f3fe46228962017a7e1337e9acadafed67eb20aabb175df98b"},
+    {file = "watchdog-4.0.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6e949a8a94186bced05b6508faa61b7adacc911115664ccb1923b9ad1f1ccf7b"},
+    {file = "watchdog-4.0.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:6a4db54edea37d1058b08947c789a2354ee02972ed5d1e0dca9b0b820f4c7f92"},
+    {file = "watchdog-4.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d31481ccf4694a8416b681544c23bd271f5a123162ab603c7d7d2dd7dd901a07"},
+    {file = "watchdog-4.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8fec441f5adcf81dd240a5fe78e3d83767999771630b5ddfc5867827a34fa3d3"},
+    {file = "watchdog-4.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:6a9c71a0b02985b4b0b6d14b875a6c86ddea2fdbebd0c9a720a806a8bbffc69f"},
+    {file = "watchdog-4.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:557ba04c816d23ce98a06e70af6abaa0485f6d94994ec78a42b05d1c03dcbd50"},
+    {file = "watchdog-4.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:d0f9bd1fd919134d459d8abf954f63886745f4660ef66480b9d753a7c9d40927"},
+    {file = "watchdog-4.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:f9b2fdca47dc855516b2d66eef3c39f2672cbf7e7a42e7e67ad2cbfcd6ba107d"},
+    {file = "watchdog-4.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:73c7a935e62033bd5e8f0da33a4dcb763da2361921a69a5a95aaf6c93aa03a87"},
+    {file = "watchdog-4.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:6a80d5cae8c265842c7419c560b9961561556c4361b297b4c431903f8c33b269"},
+    {file = "watchdog-4.0.0-py3-none-win32.whl", hash = "sha256:8f9a542c979df62098ae9c58b19e03ad3df1c9d8c6895d96c0d51da17b243b1c"},
+    {file = "watchdog-4.0.0-py3-none-win_amd64.whl", hash = "sha256:f970663fa4f7e80401a7b0cbeec00fa801bf0287d93d48368fc3e6fa32716245"},
+    {file = "watchdog-4.0.0-py3-none-win_ia64.whl", hash = "sha256:9a03e16e55465177d416699331b0f3564138f1807ecc5f2de9d55d8f188d08c7"},
+    {file = "watchdog-4.0.0.tar.gz", hash = "sha256:e3e7065cbdabe6183ab82199d7a4f6b3ba0a438c5a512a68559846ccb76a78ec"},
+]
+
+[[package]]
 name = "yarl"
 version = "1.9.4"
 requires_python = ">=3.7"
--- a/pretxncommit.sh	Sat Mar 16 12:25:20 2024 -0700
+++ b/pretxncommit.sh	Sat Mar 16 12:36:13 2024 -0700
@@ -3,7 +3,6 @@
 # e2e test including lib installs and test suite
 
 
-echo node = $HG_NODE
 SRC_DIR=`pwd`
 
 WORK_DIR=/tmp/rdferry_pretxncommit_$$
--- a/pyproject.toml	Sat Mar 16 12:25:20 2024 -0700
+++ b/pyproject.toml	Sat Mar 16 12:36:13 2024 -0700
@@ -28,4 +28,13 @@
     "pytest>=8.1.1",
     "aiohttp>=3.9.3",
     "pytest-asyncio>=0.23.5.post1",
+    "pytest-watcher>=0.4.1",
 ]
+
+[tool.pdm.scripts]
+test.help = "Run tests in current environment"
+test.cmd = "pytest"
+watch.help = "Run tests when files change"
+watch.cmd = "ptw ."
+presubmit.help = "Install to scratch project and run tests on that"
+presubmit.cmd = "./pretxncommit.sh"
\ No newline at end of file