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

TST: use temporary cache for audbcards.Datacard #103

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

hagenw
Copy link
Member

@hagenw hagenw commented Jul 25, 2024

As discovered in #97 (comment), the temporary cache for audbcards was not used when testing audbcards.Datacard. This is fixed by this pull request.

Copy link
Member

@ChristianGeng ChristianGeng left a comment

Choose a reason for hiding this comment

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

While this gets the test green for me,
the solution is to some extent scary as for me it is not plausible why it works:
the scope of the cache fixture is function.
This to me means that the three test cases can be perceived in isolation.

I will approve this anyway.

@hagenw
Copy link
Member Author

hagenw commented Jul 25, 2024

the scope of the cache fixture is function.

Yes, which means we start with an empty cache for each test function, which means in this case with an empty cache for each call to audbcards.Datacard. For the results of the tests we have at the moment, it will not make a difference if the cache is per function or per session. The only important part is that the cache is separated from a potential user cache.

@hagenw hagenw merged commit 9ad60d4 into main Jul 25, 2024
7 checks passed
@hagenw hagenw deleted the datacard-cache branch July 25, 2024 14:00
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.

2 participants