Skip to content

Removing old v3 unit tests#2766

Open
erikvansebille wants to merge 15 commits into
Parcels-code:mainfrom
erikvansebille:removing-v3-tests
Open

Removing old v3 unit tests#2766
erikvansebille wants to merge 15 commits into
Parcels-code:mainfrom
erikvansebille:removing-v3-tests

Conversation

@erikvansebille

@erikvansebille erikvansebille commented Jul 23, 2026

Copy link
Copy Markdown
Member

Description

This PR moves some of the last relevant tests from v3 over to the new v4 test suite, and removes the other irrelevant or already-copied tests. It also updates the interpolation_regression test

The only file that remains is tests-v3/test_reprs.py; @VeckoTheGecko, can you confirm if this test file can also go?

Checklist

  • Tests added
  • This PR targets the correct branch (main for normal development, v3-support for v3 support)

AI Disclosure

None

@VeckoTheGecko VeckoTheGecko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

some prelim feedback

Comment thread tests-v3/tools/test_helpers.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this test file is worth keeping.

  • _format_list_items_multiline exists in src/parcels/_reprs.py
  • deprecated and deprecated_made_private exist in src/parcels/_decorators.py

Perhaps two separate files test_decorators.py and test_repr_utils.py (and maybe a rename of src/parcels/_reprs.py to src/parcels/_repr_utils.py)

Comment thread tests/test_kernel.py
Comment on lines +206 to +218
def test_multi_kernel_duplicate_varnames(fieldset):
# Testing for merging of two Kernels with the same variable declared
def Kernel1(particles, fieldset): # pragma: no cover
add_lon = 0.1
particles.dx += add_lon

def Kernel2(particles, fieldset): # pragma: no cover
add_lon = -0.3
particles.dx += add_lon

pset = ParticleSet(fieldset, x=[0.5], y=[0.5])
pset.execute([Kernel1, Kernel2], runtime=1.0, dt=1.0)
np.testing.assert_allclose(pset.x, 0.3, rtol=1e-5)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not quite sure what this is testing - we don't have the code-generator anymore nor merge kernels internally (this test was introduced in cd6feea ).

Perhaps just remove?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants