Skip to content

Commit

Permalink
Add test for --names with --skip-lines, closes #951
Browse files Browse the repository at this point in the history
  • Loading branch information
James McKinney committed May 21, 2018
1 parent 65fa2e1 commit ba579ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

Fixes:

* :code:`--names` works with :code:`--skip-lines`.
* :doc:`/scripts/in2csv` writes XLS sheets without encoding errors in Python 2.
* :doc:`/scripts/csvsql` supports UPDATE commands.
* :doc:`/scripts/csvstat` no longer errors on non-finite numbers.
Expand Down
7 changes: 7 additions & 0 deletions tests/test_utilities/test_csvcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@ def test_no_header_row(self):
def test_ragged(self):
# Test that csvcut doesn't error when a row is short.
self.get_output(['-c', 'column_c', 'examples/bad.csv'])

def test_names_with_skip_lines(self):
self.assertLines(['--names', '--skip-lines', '3', 'examples/test_skip_lines.csv'], [
' 1: a',
' 2: b',
' 3: c',
])

0 comments on commit ba579ce

Please sign in to comment.