Update graphie files to focus on https only downloads. - #572
Conversation
Fix original_filename generation on windows.
ad4ec18 to
932765c
Compare
marcellamaki
left a comment
There was a problem hiding this comment.
No blockers but just some clarifying questions.
Also wondering - is there any utility to having tests on a different test path? beyond something like the pattern:
https://example.com/graphie/test-graph
I am not nearly familiar enough with graphie files to know if having test cases for any variations on this is worthwhile. (Beyond with the .svg and .json file types I mean. Different or potentially more complex? path structure)
|
|
||
| def __init__(self, path, **kwargs): | ||
| self.original_filename = path.split(os.path.sep)[-1].split(".")[0] | ||
| self.original_filename = path.split("/")[-1].split(".")[0] |
There was a problem hiding this comment.
So here, we are changing this because it is going to always be on a remote URL, not a local file path, right?
There was a problem hiding this comment.
Correct, and so on windows, this actually breaks things, because os.path.sep is \ there.
| return | ||
|
|
||
| # Yield content in chunks of specified size | ||
| for i in range(0, len(content), chunk_size): |
There was a problem hiding this comment.
I don't understand which scenarios we would actually be passing in a (test?) chunk_size here. I think this is just in different files? i.e. chefs.py https://github.com/marcellamaki/ricecooker/blob/develop/ricecooker/chefs.py#L859
There was a problem hiding this comment.
The content is always going to be smaller than the chunk size - I just wanted to make sure we were iterating over it, just in case we wanted to make it bigger at some point.
You'll not that I do use different paths for some tests - specifically to side step the caching that happens in other tests. |
Summary