Sumanth Vepa
Sumanth Vepa @sumanthvepa ·
I was today years old when I learned that unittest has a subpackage called mock. @OpenAICodexCli taught me how to use it. Apparently its been around since #Python 3.3. Really nice. I don't have to use third-party mocking libraries. docs.python.org/3/library/unit… #unittest #testing
Source code: Lib/unittest/mock.py unittest.mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they hav...
unittest.mock — mock object library

Source code: Lib/unittest/mock.py unittest.mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they hav...

From docs.python.org
29
James Moberg
James Moberg @gamesover ·
Replying to @gamesover
Testing CFML's DateFormat() behavior seems odd. dateformat("29-02", "m/d/yyyy") becomes 2/1/2029. "30-02" = 2/1/1930. "29-01" = 1/29/2025 (1/1/2029 is a good guess, but is wrong.) Never leave anything to chance just because "it works". #beExplicit #unitTest #isoDatesFTW
1
38
ITpedia
ITpedia @ITpedianl ·
The Unit Test: Checking Your Code Without Stress en.itpedia.nl/2025/03/04/de-… What is a #UnitTest and why is it so important? Then we’ll explore how to write and run unit tests effectively, and how they differ from other forms of #testing, such as #IntegrationTests.
The Unit Test: Checking Your Code Without Stress

Unit Testing In this article, we’ll dive into the world of unit testing, a crucial practice for any software developer striving for reliable, bug-free code. But we’ll start with the basics: What is a...

From en.itpedia.nl
11
Ifeoluwa Obayemi
Ifeoluwa Obayemi @tech_divaa ·
Been at it all day; debugging, rewriting code and hammering out unit tests with pytest. It’s a grind but there’s something satisfying about seeing those green dots after hours of red. ✅ #python #pytest #unittest
1
234