You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/03 14:11:23 UTC

[GitHub] [arrow-datafusion] kszucs opened a new pull request #493: [Python] Define the unittests using pytest

kszucs opened a new pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493


    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   `pytest` is more convenient for writing python tests and we should be able to reuse the testing suite define in `pyarrow`.
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] alamb commented on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-854878227


   @kszucs  FYI PR now needs to be rebased. I agree btw that `pytest` is really nice (and much nicer than `unittest`) πŸ‘ 


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] kszucs commented on a change in pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
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.




-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] codecov-commenter edited a comment on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-853922282


   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#493](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b1c3b1c) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/a1b8305cec4a9d2cd16797a876f98a5de410f605?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a1b8305) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head b1c3b1c differs from pull request most recent head 2fcaddc. Consider uploading reports for the commit 2fcaddc to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-datafusion/pull/493/graphs/tree.svg?width=650&height=150&src=pr&token=JXwWBKD3D9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #493   +/-   ##
   =======================================
     Coverage   75.80%   75.80%           
   =======================================
     Files         153      153           
     Lines       25924    25924           
   =======================================
     Hits        19652    19652           
     Misses       6272     6272           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a1b8305...2fcaddc](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] jorgecarleitao commented on a change in pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#discussion_r644855879



##########
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:
       Should we move this to an issue instead of a `TODO` with your name?




-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] alamb merged pull request #493: Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493


   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] codecov-commenter commented on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-853922282


   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#493](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f877f83) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/a1b8305cec4a9d2cd16797a876f98a5de410f605?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a1b8305) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head f877f83 differs from pull request most recent head 0d8ccbb. Consider uploading reports for the commit 0d8ccbb to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-datafusion/pull/493/graphs/tree.svg?width=650&height=150&src=pr&token=JXwWBKD3D9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #493   +/-   ##
   =======================================
     Coverage   75.80%   75.80%           
   =======================================
     Files         153      153           
     Lines       25924    25924           
   =======================================
     Hits        19652    19652           
     Misses       6272     6272           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a1b8305...0d8ccbb](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] codecov-commenter edited a comment on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-853922282


   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#493](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (00ce946) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/b84789afc5a67e3f70cd8903bf96993b13414aaf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b84789a) will **decrease** coverage by `0.01%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-datafusion/pull/493/graphs/tree.svg?width=650&height=150&src=pr&token=JXwWBKD3D9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #493      +/-   ##
   ==========================================
   - Coverage   76.09%   76.07%   -0.02%     
   ==========================================
     Files         155      156       +1     
     Lines       26575    26750     +175     
   ==========================================
   + Hits        20221    20351     +130     
   - Misses       6354     6399      +45     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | |
   |---|---|---|
   | [datafusion-cli/src/lib.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi1jbGkvc3JjL2xpYi5ycw==) | `0.00% <0.00%> (ΓΈ)` | |
   | [datafusion-cli/src/main.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi1jbGkvc3JjL21haW4ucnM=) | `0.00% <0.00%> (ΓΈ)` | |
   | [...lista/rust/core/src/serde/logical\_plan/to\_proto.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFsbGlzdGEvcnVzdC9jb3JlL3NyYy9zZXJkZS9sb2dpY2FsX3BsYW4vdG9fcHJvdG8ucnM=) | `61.64% <0.00%> (-0.77%)` | :arrow_down: |
   | [...sta/rust/core/src/serde/logical\_plan/from\_proto.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFsbGlzdGEvcnVzdC9jb3JlL3NyYy9zZXJkZS9sb2dpY2FsX3BsYW4vZnJvbV9wcm90by5ycw==) | `35.41% <0.00%> (-0.51%)` | :arrow_down: |
   | [datafusion/src/sql/utils.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9zcmMvc3FsL3V0aWxzLnJz) | `66.54% <0.00%> (-0.25%)` | :arrow_down: |
   | [datafusion/src/optimizer/utils.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9zcmMvb3B0aW1pemVyL3V0aWxzLnJz) | `48.05% <0.00%> (-0.18%)` | :arrow_down: |
   | [...ta/rust/core/src/serde/physical\_plan/from\_proto.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YmFsbGlzdGEvcnVzdC9jb3JlL3NyYy9zZXJkZS9waHlzaWNhbF9wbGFuL2Zyb21fcHJvdG8ucnM=) | `38.51% <0.00%> (-0.14%)` | :arrow_down: |
   | [datafusion/src/logical\_plan/expr.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9zcmMvbG9naWNhbF9wbGFuL2V4cHIucnM=) | `84.56% <0.00%> (-0.05%)` | :arrow_down: |
   | [datafusion/src/physical\_plan/planner.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9zcmMvcGh5c2ljYWxfcGxhbi9wbGFubmVyLnJz) | `80.19% <0.00%> (ΓΈ)` | |
   | [datafusion/src/physical\_plan/window\_frames.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9zcmMvcGh5c2ljYWxfcGxhbi93aW5kb3dfZnJhbWVzLnJz) | `86.60% <0.00%> (ΓΈ)` | |
   | ... and [1 more](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [ee2b9ef...00ce946](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] codecov-commenter edited a comment on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-853922282


   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#493](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8459db3) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/b84789afc5a67e3f70cd8903bf96993b13414aaf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b84789a) will **not change** coverage.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-datafusion/pull/493/graphs/tree.svg?width=650&height=150&src=pr&token=JXwWBKD3D9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #493   +/-   ##
   =======================================
     Coverage   76.09%   76.09%           
   =======================================
     Files         155      155           
     Lines       26575    26575           
   =======================================
     Hits        20221    20221           
     Misses       6354     6354           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Ξ” | |
   |---|---|---|
   | [datafusion-cli/src/lib.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi1jbGkvc3JjL2xpYi5ycw==) | `0.00% <0.00%> (ΓΈ)` | |
   | [datafusion-cli/src/main.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/493/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi1jbGkvc3JjL21haW4ucnM=) | `0.00% <0.00%> (ΓΈ)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [ee2b9ef...8459db3](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] codecov-commenter commented on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-853922282


   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#493](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f877f83) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/a1b8305cec4a9d2cd16797a876f98a5de410f605?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a1b8305) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head f877f83 differs from pull request most recent head 0d8ccbb. Consider uploading reports for the commit 0d8ccbb to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-datafusion/pull/493/graphs/tree.svg?width=650&height=150&src=pr&token=JXwWBKD3D9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #493   +/-   ##
   =======================================
     Coverage   75.80%   75.80%           
   =======================================
     Files         153      153           
     Lines       25924    25924           
   =======================================
     Hits        19652    19652           
     Misses       6272     6272           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a1b8305...0d8ccbb](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] Jimexist commented on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
Jimexist commented on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-854297177


   see related https://github.com/apache/arrow-datafusion/pull/484


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] Jimexist commented on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
Jimexist commented on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-854297177


   see related https://github.com/apache/arrow-datafusion/pull/484


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] jorgecarleitao commented on a change in pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on a change in pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#discussion_r644855879



##########
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:
       Should we move this to an issue instead of a `TODO` with your name?




-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] jorgecarleitao commented on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-855745242


   Do we need two requirements files? I think we only need one, for the tests?


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] kszucs commented on a change in pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] codecov-commenter edited a comment on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-853922282


   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#493](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b1c3b1c) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/a1b8305cec4a9d2cd16797a876f98a5de410f605?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a1b8305) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head b1c3b1c differs from pull request most recent head 2fcaddc. Consider uploading reports for the commit 2fcaddc to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow-datafusion/pull/493/graphs/tree.svg?width=650&height=150&src=pr&token=JXwWBKD3D9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #493   +/-   ##
   =======================================
     Coverage   75.80%   75.80%           
   =======================================
     Files         153      153           
     Lines       25924    25924           
   =======================================
     Hits        19652    19652           
     Misses       6272     6272           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Ξ” = absolute <relative> (impact)`, `ΓΈ = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a1b8305...2fcaddc](https://codecov.io/gh/apache/arrow-datafusion/pull/493?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] kszucs commented on pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
kszucs commented on pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#issuecomment-855814283


   We used multiple requirements file in pyarrow for easier dependency composition. Though there are nicer ways to define  multiple kinds of dependency. I don't have a strong preference, so I'm going to add pytest to the `requiremets.txt` file.


-- 
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:
users@infra.apache.org



[GitHub] [arrow-datafusion] kszucs commented on a change in pull request #493: [Python] Define the unittests using pytest

Posted by GitBox <gi...@apache.org>.
kszucs commented on a change in pull request #493:
URL: https://github.com/apache/arrow-datafusion/pull/493#discussion_r644876703



##########
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:
users@infra.apache.org