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

move functional tests out of unit test suite #832

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Conversation

mattseddon
Copy link
Member

closes #829

This PR moves functional tests from tests/unit underneath tests/func.

When combined with the changes in #831 the total run time of the tests/unit/lib folder is < 15 seconds (on my machine) as opposed to ~40 seconds for main.

@mattseddon mattseddon self-assigned this Jan 20, 2025
@mattseddon mattseddon changed the title Move func tests move functional tests out of unit test suite Jan 20, 2025
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.43%. Comparing base (78f8953) to head (d90cae9).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #832   +/-   ##
=======================================
  Coverage   87.43%   87.43%           
=======================================
  Files         128      128           
  Lines       11377    11377           
  Branches     1547     1547           
=======================================
  Hits         9947     9947           
  Misses       1040     1040           
  Partials      390      390           
Flag Coverage Δ
datachain 87.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mattseddon mattseddon marked this pull request as ready for review January 20, 2025 02:17
@mattseddon mattseddon requested a review from a team January 20, 2025 02:17
Comment on lines +96 to +101
@pytest.mark.parametrize(
"cloud_type,version_aware",
[("s3", True)],
indirect=True,
)
def test_convert_type(cloud_test_catalog):
Copy link
Member

@skshetry skshetry Jan 20, 2025

Choose a reason for hiding this comment

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

This test looks like an unittest. Unrelated, but this probably does not s3 fixture (I am not asking you to fix this, just a drive-by comment).

@@ -555,6 +556,23 @@ def test_mutate_existing_column(test_session):
assert list(ds.order_by("ids").collect()) == [(2,), (3,), (4,)]


@pytest.mark.parametrize("processes", [False, 2, True])
@pytest.mark.xdist_group(name="tmpfile")
def test_parallel(processes, test_session_tmpfile):
Copy link
Member

Choose a reason for hiding this comment

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

What was the reason to move this to func?

Copy link
Member Author

Choose a reason for hiding this comment

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

Run time, the fact it is write to disk and the group it is in

@@ -613,6 +631,36 @@ def name_len(name):
assert count == 7


@pytest.mark.xdist_group(name="tmpfile")
def test_udf_parallel_boostrap(test_session_tmpfile):
Copy link
Member

Choose a reason for hiding this comment

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

Same question here: what was the reason to move this to func tests?

@mattseddon mattseddon merged commit d4698fe into main Jan 20, 2025
38 checks passed
@mattseddon mattseddon deleted the move-func-tests branch January 20, 2025 19:41
dreadatour pushed a commit that referenced this pull request Jan 27, 2025
* move tests using cloud_test_catalog into func directory

* move tests using tmpfile catalog

* move long running tests that read/write from disk
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.

Unit tests for diff take 25 seconds
3 participants