Add unittest for DownloadHistory
See original GitHub issueAs you can see here, half of download_history.py is not covered by unittests.
At least, I want to test DownloadHistory.get fucntion.
We can test this module by 3 steps.
- Clear
utils.cache_dir / 'download-history.jsonl'. - Execute
oj d, or directly instanciateDownloadHistoryand callDownloadHistory.add. - Instanciate
DownloadHistoryand callDownloadHistory.getand veryfy its return value.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
unittest — Unit testing framework — Python 3.11.1 ...
A test fixture represents the preparation needed to perform one or more tests, and any associated cleanup actions. This may involve, for example,...
Read more >Python: How to run unittest.main() for all source files in a ...
py file found & exits the calling test.py, plus then I have to duplicate my code by adding unittest.main() in every source file--which...
Read more >How To Use unittest to Write a Test Case for a Function in ...
Tests written using the unittest module can help you find bugs in your ... ValueError("A maximum of 10 fish can be added to...
Read more >Build local unit tests - Android Developers
Local tests location; Adding testing dependencies; Create a local unit test class; Mockable Android library. Mocking Android dependencies ...
Read more >Walkthrough: Create and run unit tests for UWP apps
Select the Unit Test App (Universal Windows) template for either C# or Visual Basic, and then select Next. Screenshot that shows creating a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @meda123 you still working on that? I want to give a try.
Hi - May I work this issue?