Load test data into the DB and return it as a string for comparison.
(self, csv_file, db=None)
| 32 | pass |
| 33 | |
| 34 | def csvsql(self, csv_file, db=None): |
| 35 | """ |
| 36 | Load test data into the DB and return it as a string for comparison. |
| 37 | """ |
| 38 | if not db: |
| 39 | db = 'sqlite:///' + self.db_file |
| 40 | |
| 41 | args = ['--db', db, '--tables', 'foo', '--insert', csv_file, '--no-inference'] |
| 42 | |
| 43 | utility = CSVSQL(args) |
| 44 | utility.run() |
| 45 | |
| 46 | with open(csv_file) as f: |
| 47 | text = f.read() |
| 48 | |
| 49 | return text.strip() |
| 50 | |
| 51 | def test_encoding(self): |
| 52 | # Test that csvstat doesn't error on Latin-1 input. |
no test coverage detected