loading...

Loop on fail - Small Pytest Trick to Boost Your Productivity

twitter logo github logo ・1 min read

While reading pytest-xdist docs I came across a very interesting flag

-f, --looponfail    run tests in subprocess, wait for modified files
                    and re-run failing test set until all pass.

Amazing! especially if you have slow tests and you want faster feedback loop.
All you need to do is to install the pytest-xdist plugin
pip install pytest-xdist
and then run your tests with -f switch.
Now pytest will watch for file changes and run failing tests

Found this post useful? Add a star⭐️ to my Github projectπŸ™‚

GitHub logo moshe / elasticsearch-comrade

Elasticsearch admin panel built for ops and monitoring

Elasticsearch Comrade Twitter Follow python docker pulls CircleCI GitHub issues GitHub license

Elasticsearch Comrade is an open-source Elasticsearch admin and monitoring panel highly inspired by Cerebro. Elasticsearch Comrade built with python3, VueJS, Sanic, Vuetify2 and Cypress Alt text Alt text

Main Features

  • Elasticsearch version 5,6 and 7 support (tested against elasticsearch 7.4)
  • Multi cluster
  • Rest API with autocompletion, history, templates, and history
  • SQL editor (version 7 only)
  • Built for big clusters
  • Node statistics and monitoring
  • Manage aliases
  • Inspect running tasks
  • Manage index templates
  • Manage snapshots
  • And much more ...

Quckstart

Cluster dir definitaions

Comrade discovers clusters using the --clusters-dir param, docs are here, examples are here

Using docker (recommended)

docker run -v $PWD/clusters/:/app/comrade/clusters/ -it -p 8000:8000 mosheza/elasticsearch-comrade

Using the python package

pip install elasticsearch-comrade
comrade --clusters-dir clusters

Installation, configuration and next steps

Here

Roadmap

v1.1.0

  • Add python package
  • Reindex screen
  • Comrade dashboard

v1.2.0

  • Cluster settings screen
  • Evacuate node from shards
  • Add commrade version indicator to footer

v1.3.0

  • Beats screen
  • Threadpools screen

Screenshots

Alt text Alt text Alt text Alt text Alt text

twitter logo DISCUSS
Classic DEV Post from May 6 '19

Thoughts on legacy code, diversity and inclusion

TLDR; If you're still dropping snarky commentaries about PHP on Twitter, just grow up already.

Moshe Zada profile image
Backend developer by day, frontend developer by night