81: TDD with flit
Test & Code17 Juli 2019

81: TDD with flit

In the last episode, we talked about going from script to supported package.
I worked on a project called subark and did the packaging with flit.

Today's episode is a continuation where we add new features to a supported package and how to develop and test a flit based package.

Covered:

  • viewing stages of a project with git tags
  • flit support for editable installs
  • flit description entry in pyproject.toml to put README on pypi.
  • development dependencies in pyproject.toml
  • editor layout for optimal TDD-ing
  • test case grouping
  • modifications to traditional TDD that helps me develop faster.

code and command snippets from episode:

For git checkout of versions:

$ git clone https://github.com/okken/submark.git $ cd submark $ python3 -m venv venv --prompt submark $ source ./bin/activate (submark) $ git checkout v0.1 ... etc ... (submark) $ git checkout v0.7

To grab the latest again:

(submark) $ git checkout master

pyproject.toml change for README to show up on pypi:

[tool.flit.metadata] ... description-file = "README.md" ...

Adding dev dependencies to pyproject.toml:

[tool.flit.metadata.requires-extra] test = ["pytest", "pytest-cov", "tox"]

Installing in editable mode (in top level repo directory). works in mac, linux, windows:

(submark) $ flit install --pth-file

or for mac/linux:

(submark) $ flit install -s

Links:

Det här avsnittet är hämtat från ett öppet RSS-flöde och publiceras inte av Podme. Det kan innehålla reklam.

Avsnitt(237)

238: So Long, and Thanks for All the Fish

238: So Long, and Thanks for All the Fish

A farewell to a fun 10 years.Also, I should have tested it better. :)In the audio I got the numbers wrong.  Doh!This is episode 238, not 237. Oh well.I'll still be around, of course, at:pythontest.com...

15 Aug 20252min

237: FastAPI Cloud - Sebastián Ramírez

237: FastAPI Cloud - Sebastián Ramírez

In this episode, Brian interviews Sebastián Ramírez, creator of FastAPI, about its rapid rise in developer popularity and the launch of FastAPI Cloud. Sebastian explains how FastAPI Cloud addresses de...

11 Aug 202536min

236: Git Tips for Testing - Adam Johnson

236: Git Tips for Testing - Adam Johnson

In this episode, host Brian Okken and guest Adam Johnson explore essential Git features, highlighted by Adam's updated book, "Boost Your Git DX." Key topics include "cherry picking" for selective comm...

30 Juli 202519min

235: pytest-django - Adam Johnson

235: pytest-django - Adam Johnson

In this episode, special guest Adam Johnson joins the show and examines pytest-django, a popular plugin among Django developers. He highlights its advantages over the built-in unittest framework, incl...

22 Juli 202519min

234: pytest-metadata - provides access to test session metadata

234: pytest-metadata - provides access to test session metadata

pytest-metadata is described as a plugin for pytest that provides access to test session metadata. That is such a humble description for such a massively useful plugin. If you're already using pytest-...

8 Maj 20256min

233: pytest-check - allow multiple failures per test

233: pytest-check - allow multiple failures per test

pytest-check is a pytest plugin that allows multiple failures per test.Normally, a test function will fail and stop running with the first failed assert. That's totally fine for tons of kinds of softw...

2 Maj 20258min

232: The role of AI in software testing - Anthony Shaw

232: The role of AI in software testing - Anthony Shaw

AI is helping people write code.  Tests are one of those things that some people don't like to write.   Can AI play a role in creating automated software tests?  Well, yes. But it's a nuanced yes.  An...

25 Apr 202556min

231: pytest-repeat - works fine on Python 3.14

231: pytest-repeat - works fine on Python 3.14

pytest-repeat is a pytest plugin that makes it easy to repeat a single test, or multiple tests, a specific number of times.  works fine on Python 3.14is tested on Python 3.9-3.14probably works fine st...

10 Apr 20257min

Populärt inom Utbildning

det-skaver
rss-bara-en-till-om-missbruk-medberoende-2
historiepodden-se
nu-blir-det-historia
allt-du-velat-veta
harrisons-dramatiska-historia
johannes-hansen-podcast
not-fanny-anymore
roda-vita-rosen
rss-viktmedicinpodden
i-vantan-pa-katastrofen
rikatillsammans-om-privatekonomi-rikedom-i-livet
sa-in-i-sjalen
sektledare
rss-max-tant-med-max-villman
rss-autismandan
rss-basta-livet
rss-traningsklubben
rss-i-skenet-av-blaljus
vi-gar-till-historien