Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add missing test utils module.

  • Loading branch information...
commit 9a62bdc5910982b493bc39c8f577c1e93a46b72c 1 parent 36b4c86
@onyxfish authored
Showing with 14 additions and 0 deletions.
  1. +2 −0  csvkit/utilities/csvsql.py
  2. +12 −0 tests/utils.py
View
2  csvkit/utilities/csvsql.py
@@ -30,6 +30,8 @@ def add_arguments(self):
help='Skip creating a table. Only valid when --insert is specified.')
self.argparser.add_argument('--blanks', dest='blanks', action='store_true',
help='Do not coerce empty strings to NULL values.')
+ self.argparser.add_argument('--no-infer', dest='no_infer',
+ help='A comma separated list of column indices or names to skip type inference. Specified columns will be treated as strings.')
def main(self):
# Ensure we're handling a list, even if it's just one file
View
12 tests/utils.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+from contextlib import contextmanager
+import sys
+
+@contextmanager
+def stderr_as_stdout():
+ temp = sys.stderr
+ sys.stderr = sys.stdout
+ yield
+ sys.stderr = temp
+
Please sign in to comment.
Something went wrong with that request. Please try again.