From 8ddc98b8000cd88aa3fd53881cd3d3df8ee1a9b3 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Fri, 6 May 2016 20:48:42 -0700 Subject: fix test to run locally --- tests/test_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_functions.py b/tests/test_functions.py index 425ab7f..9207815 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -13,6 +13,7 @@ sys.path.insert(0, '..') from sqlparse.filters import compact from sqlparse.functions import getcolumns, getlimit, IsType +from tests.utils import FILES_DIR class Test_IncludeStatement(TestCase): @@ -27,7 +28,7 @@ class Test_IncludeStatement(TestCase): def test_includeStatement(self): stream = tokenize(self.sql) - includeStatement = IncludeStatement('tests/files', + includeStatement = IncludeStatement(FILES_DIR, raiseexceptions=True) stream = includeStatement.process(None, stream) stream = compact(stream) -- cgit v1.2.1 From 1e770d9b99983fa82375b71c5b3f5d8c6bb1a72e Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Tue, 10 May 2016 21:50:46 -0700 Subject: separate identifier grouping into its components leaving sql.Operations in for future PR small behavior changed for invalid identifier --- tests/test_grouping.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 7dc1269..daaec9b 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -89,9 +89,9 @@ class TestGrouping(TestCaseBase): p = sqlparse.parse('a.')[0] self.assert_(isinstance(p.tokens[0], sql.Identifier)) self.assertEqual(p.tokens[0].has_alias(), False) - self.assertEqual(p.tokens[0].get_name(), None) - self.assertEqual(p.tokens[0].get_real_name(), None) - self.assertEqual(p.tokens[0].get_parent_name(), 'a') + self.assertEqual(p.tokens[0].get_name(), 'a') + self.assertEqual(p.tokens[0].get_real_name(), 'a') + self.assertEqual(p.tokens[0].get_parent_name(), None) def test_identifier_as_invalid(self): # issue8 p = sqlparse.parse('foo as select *')[0] -- cgit v1.2.1