8000 Centralise test file references by jacalata · Pull Request #1614 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Centralise test file references #1614

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

jacalata
Copy link
Contributor

First I tried moving test assets into folders, then I realized that I had to update file references individually in all the test files. So I went back to do all the file path work in a utility and call that, for easier changing.

@jacalata jacalata added the infra Infrastructure issues (GitHub, etc) label May 16, 2025
@jorwoods
Copy link
Contributor

I've thought about similar changes to the tests. I think switching to pathlib.Path objects for the test assets also simplifies things.

CUSTOM_VIEW_UPDATE_XML = xml_asset_path("custom_view_update.xml")
CUSTOM_VIEW_POPULATE_PDF = data_asset_path("populate_pdf.pdf")
CUSTOM_VIEW_POPULATE_CSV = data_asset_path("populate_csv.csv")
CUSTOM_VIEW_DOWNLOAD = Path(xml_asset_path("custom_view_download.json"))

Choose a reason for hiding this comment

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

I noticed some use Path from pathlib and some don't. Is that intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Infrastructure issues (GitHub, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0