(self)
| 164 | ''')) # noqa: W291 |
| 165 | |
| 166 | def test_stdin(self): |
| 167 | input_file = io.BytesIO(b'a,b,c\n4,2,3\n') |
| 168 | |
| 169 | with stdin_as_string(input_file): |
| 170 | sql = self.get_output(['--tables', 'foo']) |
| 171 | |
| 172 | self.assertEqual(sql.replace('\t', ' '), dedent('''\ |
| 173 | CREATE TABLE foo ( |
| 174 | a DECIMAL NOT NULL, |
| 175 | b DECIMAL NOT NULL, |
| 176 | c DECIMAL NOT NULL |
| 177 | ); |
| 178 | ''')) # noqa: W291 |
| 179 | |
| 180 | input_file.close() |
| 181 | |
| 182 | def test_stdin_and_filename(self): |
| 183 | input_file = io.BytesIO(b'a,b,c\n1,2,3\n') |
nothing calls this directly
no test coverage detected