Skip to content

Commit 3ad5398

Browse files
committed
Test for csvstat fix.
1 parent 459d8ec commit 3ad5398

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ The following individuals have contributed code to csvkit:
4545
* Richard Low
4646
* Kristina Durivage
4747
* Espartaco Palma
48+
* pnaimoli

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
0.8.0
22
-----
33

4+
* Add pnaimoli to AUTHORS.
5+
* Fix column specification in csvstat. (#236)
46
* Added "Tips and Tricks" documentation. (#297, #298)
57
* Add Espartaco Palma to AUTHORS.
68
* Remove unnecessary enumerate calls. (#292)

tests/test_utilities/test_csvstat.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,15 @@ def test_encoding(self):
2424
utility = CSVStat(args, output_file)
2525
utility.main()
2626

27+
def test_no_header_row(self):
28+
args = ['-H', '-c', '2', 'examples/no_header_row.csv']
29+
output_file = six.StringIO()
30+
31+
utility = CSVStat(args, output_file)
32+
utility.main()
33+
34+
stats = output_file.getvalue()
35+
36+
self.assertFalse('column1' in stats)
37+
self.assertTrue('column2' in stats)
38+

0 commit comments

Comments
 (0)