kszucs commented on a change in pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#discussion_r644869221



##########
File path: python/tests/test_sql.py
##########
@@ -15,280 +15,177 @@
 # specific language governing permissions and limitations
 # under the License.
 
-import unittest
-import tempfile
-import datetime
-import os.path
-import shutil
+import numpy as np
+import pyarrow as pa
+import pytest
+from datafusion import ExecutionContext
 
-import numpy
-import pyarrow
-import datafusion
+from . import generic as helpers
 
-# used to write parquet files
-import pyarrow.parquet
 
-from tests.generic import *
+@pytest.fixture
+def ctx():
+    return ExecutionContext()
 
 
-class TestCase(unittest.TestCase):
-    def setUp(self):
-        # Create a temporary directory
-        self.test_dir = tempfile.mkdtemp()
-        numpy.random.seed(1)
+def test_no_table(ctx):
+    # TODO(kszucs): should raise a DataFusionError instead of plain Exeption

Review comment:
       Yep, will create an issue.

##########
File path: python/tests/test_sql.py
##########
@@ -15,280 +15,177 @@
 # specific language governing permissions and limitations
 # under the License.
 
-import unittest
-import tempfile
-import datetime
-import os.path
-import shutil
+import numpy as np
+import pyarrow as pa
+import pytest
+from datafusion import ExecutionContext
 
-import numpy
-import pyarrow
-import datafusion
+from . import generic as helpers
 
-# used to write parquet files
-import pyarrow.parquet
 
-from tests.generic import *
+@pytest.fixture
+def ctx():
+    return ExecutionContext()
 
 
-class TestCase(unittest.TestCase):
-    def setUp(self):
-        # Create a temporary directory
-        self.test_dir = tempfile.mkdtemp()
-        numpy.random.seed(1)
+def test_no_table(ctx):
+    # TODO(kszucs): should raise a DataFusionError instead of plain Exeption

Review comment:
       https://github.com/apache/arrow-datafusion/issues/494




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to