jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.58k stars 589 forks source link

fix #524 check for type list and improve error msg #534

Closed llazzaro closed 1 year ago

llazzaro commented 1 year ago

Unit test to reproduce the issue #524 and improve error message

codecov[bot] commented 1 year ago

Codecov Report

Merging #534 (088513a) into master (bbc2739) will increase coverage by 0.02%. The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master     #534      +/-   ##
==========================================
+ Coverage   90.95%   90.97%   +0.02%     
==========================================
  Files          28       28              
  Lines        2652     2660       +8     
==========================================
+ Hits         2412     2420       +8     
  Misses        240      240              
Impacted Files Coverage Δ
src/tablib/core.py 84.07% <75.00%> (+0.11%) :arrow_up:
tests/test_tablib.py 98.64% <100.00%> (+<0.01%) :arrow_up:

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

llazzaro commented 1 year ago

Noticed that coverage job failed on master. I will fix it with a new PR.

claudep commented 1 year ago

Frankly, coverage reports are generally so broken I don't even consider them.

llazzaro commented 1 year ago

Just in case created this PR https://github.com/jazzband/tablib/pull/535/files

Found a small bug when using empty files. Not sure if it is better to raise an exception or return empty list.