Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache testing #29

Merged
merged 10 commits into from
Feb 3, 2019
Merged

Cache testing #29

merged 10 commits into from
Feb 3, 2019

Conversation

Kronopt
Copy link
Member

@Kronopt Kronopt commented Feb 3, 2019

  • Tests for cache feature
  • Fixed cache dir bug when using default cache_location parameter
  • Added cache_type property to V2Client
  • Fixed other small typos

- refactored main variables and test names
- separated uid str tests from uid int tests
- __repr__ testing
- Fixed cache dir bug when using default cache_location parameter
- Added cache_type property to V2Client

- Changed setUp(self) to setUpClass(cls). setUp was called every time before each test...
- Created TestV2ClientCacheInDisk with tearDownClass(cls) to clear cache directory
- Tests (for both in-disk and in-memory):
-- 'cache_info' - test cache_info (0 hit, 0 miss, 0 cache)
-- 'cache_clear' - test cache_clear (0 hit, 0 miss, 0 cache)
-- 'cache_location' - test cache location
-- '011' - 0 hit, 1 miss, 1 cached
-- '111' - 1 hit, 1 miss, 1 cached
-- '022' - 0 hit, 2 miss, 2 cached
- Test upper case strings for uid
@codecov
Copy link

codecov bot commented Feb 3, 2019

Codecov Report

Merging #29 into master will increase coverage by 7.95%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
+ Coverage   85.63%   93.59%   +7.95%     
==========================================
  Files           3        3              
  Lines        1058     1061       +3     
==========================================
+ Hits          906      993      +87     
+ Misses        152       68      -84
Impacted Files Coverage Δ
pokepy/resources_v2.py 93.25% <100%> (+4.9%) ⬆️
pokepy/api.py 97.33% <100%> (+50.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62b4361...7e12fb9. Read the comment docs.

@Kronopt Kronopt merged commit e1311d2 into master Feb 3, 2019
@Kronopt Kronopt deleted the cache-testing branch February 3, 2019 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant