Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@llazzaro
Copy link
Contributor

While adding some coverage discovered the using len(pickle) will raise and error since for empty files pickle is None.

Change the if condition to just not pickle since it will also work for checking if the list is empty.

Added two test cases to cover more branches.

@codecov
Copy link

codecov bot commented Jan 21, 2023

Codecov Report

Merging #535 (4a17e3f) into master (0a3511f) will increase coverage by 0.18%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #535      +/-   ##
==========================================
+ Coverage   90.97%   91.16%   +0.18%     
==========================================
  Files          28       28              
  Lines        2660     2670      +10     
==========================================
+ Hits         2420     2434      +14     
+ Misses        240      236       -4     
Impacted Files Coverage Δ
src/tablib/core.py 85.01% <100.00%> (+0.93%) ⬆️
tests/test_tablib.py 98.66% <100.00%> (+0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, thanks!

@claudep
Copy link
Contributor

claudep commented Jan 21, 2023

Maybe just adapt the commit message to specify this concerns the yaml format.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could you check the permissions failure on Windows?

@claudep
Copy link
Contributor

claudep commented Jan 21, 2023

Ah yes, NamedTemporaryFile constructor is already returning a file-like object, so no need to reopen later (and Windows cannot reopen when it's already open).

@llazzaro
Copy link
Contributor Author

  • git commit message fixed
  • fix windows broken test

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@claudep claudep merged commit b2be12e into jazzband:master Jan 21, 2023
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.

3 participants