Kaizen Today I Learned by Ville Säävuori

Posts tagged cheatsheet

Vercel Cheat Sheet

See TILs tagged with Vercel Useful Links Environment Variables Docs vercel.json Project Configuration Configuration Redirects for JavaScript Routers For routers like vue-router with history mode enabled, something like this in vercel.json works: "rewrites": [ { "source": "/(.*)", "destination": "/index.html" } ] Redirects for Python Functions This (legacy) configuration is the only one that seems to work with Python at the moment:

· Read the full article →

Pytest Cheat Sheet

Pytest Official Docs Running Fail fast / stop after first failure: pytest -x Run from module or directory: pytest dir/tests/footest.py, pytest dir/ Run specific markers: pytest -m marker (mark with @pytest.mark.mymarker) Drop to pdb on failure: pytest --pdb (set breakpoint w/ breakpoint()) Recreate database using pytest-django: --create-db Configuration pytest.ini conftest.

· Read the full article →