diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2014-11-23 16:54:14 -0500 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2014-11-23 16:54:14 -0500 |
commit | d90c3927cd637472b4c5025c45571f5700ea8810 (patch) | |
tree | d3d97ffb8739ee5a2f36ca13cb6e7a9bc95ca5da | |
parent | d04a24c8715dc2af32f623c72ee7dd69c2ede198 (diff) |
modified non existent file error msg + fixed response bug in table_structure when there are errors
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | bin/q | 4 | ||||
-rwxr-xr-x | test/test-suite | 11 |
3 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,4 @@ build q.spec q.1 +*.pyc @@ -680,7 +680,7 @@ class TableCreator(object): # If there are no files to go over, if len(materialized_file_list) == 0: raise FileNotFoundException( - "No files have been found for '%s'" % self.filenames_str) + "No files matching '%s' have been found" % self.filenames_str) return materialized_file_list @@ -1129,7 +1129,7 @@ class QTextAsData(object): warnings = [] error = None data_loads = [] - table_structures = None + table_structures = [] db_results_obj = None diff --git a/test/test-suite b/test/test-suite index d627041..ac54971 100755 --- a/test/test-suite +++ b/test/test-suite @@ -1250,6 +1250,17 @@ class BasicTests(AbstractQTestCase): self.cleanup(tmp_data_file) + def test_nonexistent_file(self): + cmd = '../bin/q "select * from non-existent-file"' + + retcode, o, e = run_command(cmd) + + self.assertNotEquals(retcode,0) + self.assertEquals(len(o),0) + self.assertEquals(len(e),1) + + self.assertEquals(e[0],"No files matching 'non-existent-file' have been found") + class ParsingModeTests(AbstractQTestCase): def test_strict_mode_column_count_mismatch_error(self): |