Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define the unittests using pytest #493

Merged
merged 9 commits into from
Jun 9, 2021
Merged

Define the unittests using pytest #493

merged 9 commits into from
Jun 9, 2021

Conversation

kszucs
Copy link
Member

@kszucs kszucs commented Jun 3, 2021

Rationale for this change

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?

Are there any user-facing changes?

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2021

Codecov Report

Merging #493 (00ce946) into master (b84789a) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            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 Coverage Δ
datafusion-cli/src/lib.rs 0.00% <0.00%> (ø)
datafusion-cli/src/main.rs 0.00% <0.00%> (ø)
...lista/rust/core/src/serde/logical_plan/to_proto.rs 61.64% <0.00%> (-0.77%) ⬇️
...sta/rust/core/src/serde/logical_plan/from_proto.rs 35.41% <0.00%> (-0.51%) ⬇️
datafusion/src/sql/utils.rs 66.54% <0.00%> (-0.25%) ⬇️
datafusion/src/optimizer/utils.rs 48.05% <0.00%> (-0.18%) ⬇️
...ta/rust/core/src/serde/physical_plan/from_proto.rs 38.51% <0.00%> (-0.14%) ⬇️
datafusion/src/logical_plan/expr.rs 84.56% <0.00%> (-0.05%) ⬇️
datafusion/src/physical_plan/planner.rs 80.19% <0.00%> (ø)
datafusion/src/physical_plan/window_frames.rs 86.60% <0.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee2b9ef...00ce946. Read the comment docs.

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

python/tests/test_sql.py Outdated Show resolved Hide resolved
@jimexist
Copy link
Member

jimexist commented Jun 4, 2021

see related #484

@alamb alamb added datafusion Changes in the datafusion crate and removed datafusion Changes in the datafusion crate labels Jun 4, 2021
@alamb
Copy link
Contributor

alamb commented Jun 4, 2021

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

@alamb alamb added the python label Jun 4, 2021
@jorgecarleitao
Copy link
Member

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

@kszucs
Copy link
Member Author

kszucs commented Jun 7, 2021

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.

@kszucs kszucs requested a review from jorgecarleitao June 7, 2021 11:38
@jorgecarleitao jorgecarleitao changed the title [Python] Define the unittests using pytest Define the unittests using pytest Jun 7, 2021
@alamb alamb merged commit 42f908e into apache:master Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants