Skip to content

Conversation

rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Aug 24, 2025

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

scripts/ tests fail when you don't run from the root directory of the repository.

@rhshadrach rhshadrach added this to the 3.0 milestone Aug 24, 2025
@rhshadrach rhshadrach added Testing pandas testing functions or related to the test suite CI Continuous Integration labels Aug 24, 2025
@@ -10,7 +10,7 @@ class TestStringsWithWrongPlacedWhitespace:
"data",
[
(
"""
r"""
Copy link
Member Author

Choose a reason for hiding this comment

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

Noticed that without having this as a raw string, the test will fail on Python 3.12.

@rhshadrach rhshadrach changed the title CI: Fix scripts tests for running from another directory CI: Fix scripts tests when running from another directory Aug 24, 2025
@@ -10,34 +10,36 @@
pin_min_versions_to_yaml_file,
)

BASE_PATH = pathlib.Path(__file__).parents[2]
Copy link
Member

Choose a reason for hiding this comment

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

Might be more robust to define pathlib.Path("scripts/tests/data/").resolve() that can be used for the test below

Copy link
Member Author

Choose a reason for hiding this comment

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

Made an update here to use DATA_PATH with scripts/test/data appended. But we don't want to use pathlib.Path("scripts/tests/data/") as that would only be correct if you're running the test from the root directory of the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants