About 41 results
https://rednafi.com/python/patch-where-the-object-is-used/ · 18 Jul 2022
Master Python mocking: patch objects at their import location, not where they're defined, to avoid common unittest.mock pitfalls.
https://rednafi.com/python/partially-assert-callable-arguments/ · 17 Jul 2022
Assert specific mock call arguments while ignoring others using unittest.mock.ANY for flexible test assertions without brittle checks.
https://rednafi.com/python/mocking-datetime-objects/ · 16 Mar 2022
Mock chained datetime methods in Python tests using unittest.mock to handle immutable datetime objects without external dependencies.
https://rednafi.com/python/parametrized-fixtures-in-pytest/ · 10 Mar 2022
Create dynamic pytest fixtures with @pytest.fixture(params) to run tests with multiple configurations and parameter combinations.
https://rednafi.com/python/patch-with-pytest-fixture/ · 27 Feb 2022
Combine pytest fixtures with unittest.mock.patch for clean, reusable test mocking patterns that integrate seamlessly with pytest's ecosystem.
https://rednafi.com/python/use-assertis-to-check-literal-booleans/ · 24 Jan 2022
Test literal booleans correctly in Python unittest using assertIs instead of assertTrue/assertFalse to avoid truthy/falsy confusion.
https://rednafi.com/python/use-daemon-threads-to-test-infinite-loop/ · 18 Nov 2021
Test Python infinite loops safely using daemon threads with timeouts, allowing tests to complete without hanging or blocking execution.
https://codeklets.nl/episodes/390 · 18 May 2021
Paul de Witt en Bas Dijkstra vertellen hun ervaringen en advies rondom Testautomatisering
https://hacdias.com/2020/10/19/testing-p2p-systems-testground/ · 19 Oct 2020 · 🦋 Bluesky
P2P systems are not always easy to test. Due to their nature, there's a lot of constraints and network scenarios that might happen. Testground can help!
https://rants.broonix.ca/selenium-screenshots-in-continuous-integration · 8 Sep 2016
There is nothing worse that when your tests fail only on your continuous integration server. This non-deterministic behaviour can be a pain to debug. This is compounded when testing with Selenium. If you can’t see the state of the browser when a test fai...