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

yaml files with the same name loaded by different pytest generators conflict on fixtures #255

Open
cdent opened this issue Jul 9, 2018 · 0 comments

Comments

@cdent
Copy link
Owner

cdent commented Jul 9, 2018

A global cache in gabbi/pytester.py uses keys which are insufficiently distinct when a yaml file has the same name but is in a different directory and loaded via a different test.

(More detail to follow, this is a reminder)

cdent pushed a commit that referenced this issue Jul 16, 2018
allow reading yaml data from disk with YAMLDiskLoadingJSONHandler

This commit aims to extend the jsonhandler to be able to read
data from disk if it is a yaml file.

 Simply replacing the loads call with yaml.safe_load is not enough
 due to the nature of the NaN checker requiring an unsafe load[1].

closes #253

Tests with the same filename were failing when running the tests
under pytest, see #255

To avoid running more than one response handler for the same type,
use a set to track the handers we have available.
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

No branches or pull requests

1 participant