question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add unittest for DownloadHistory

See original GitHub issue

As 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 instanciate DownloadHistory and call DownloadHistory.add.
  • Instanciate DownloadHistory and call DownloadHistory.get and veryfy its return value.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
luchiagocommented, Dec 3, 2019

Hi @meda123 you still working on that? I want to give a try.

1reaction
meda123commented, Oct 21, 2019

Hi - May I work this issue?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found