Comment

Comment by maksimum

> The condition is, though, that I need to be able to quickly run the program to validate just all of it to work.

That's a condition for all TDD.

> I know there's testing frameworks, although it seems more of an eclectic mess than Java

If you look at the test suites for popular libraries like numpy, django, airflow it's mostly `pytest`, `unittest` (part of the standard library), and `nose`.

> where testing and mocking is just a little harder to do...

Mocking is actually pretty easy to do in python using pytest.monkeypatch or unittest.mock. Compared to mocking in a strongly typed language like C++ (and I assume Java) if an object you're mocking implements a particular interface, you would only have to mock out the parts that get exercied by the codepath in the tests you care about.

parent maksimum 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton