Skip to content

Commit

Permalink
Add missing test utils module.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Aug 15, 2012
1 parent 36b4c86 commit 9a62bdc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions csvkit/utilities/csvsql.py
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions 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

0 comments on commit 9a62bdc

Please sign in to comment.