mozilla / active-data-recipes

A repository of various activedata queries and recipes
Mozilla Public License 2.0
8 stars 24 forks source link

Editted test_queries to test for table format #66

Closed nikk15 closed 5 years ago

nikk15 commented 5 years ago

The "result" table is in ascii format. In order to assert "result" == the "expected" table, every character that comprised the "expected" table was converted to its exact code point representation and compiled into a string. This is not a perfect fix as it is convoluted and will make the .test files quite large. Any feedback on how to improve this is much appreciated!

ahal commented 5 years ago

You know what, maybe we can just leave this single query in the table format. If one can be formatted to a table, that at least covers those code paths so it's probably good enough. That way we don't make the size of the other .test files too big while still getting our test coverage.

I do agree that it isn't as nice to look at, but I think that's ok.

nikk15 commented 5 years ago

Hey @ahal. Glad you approve!! I did this on a separate branch without the the other .test files, so maybe that is why it's not breaking? I'll tweek this so it will still test all the other files for json format and only this one for table format. Amendments up shortly, then it should hopefully be all good to land.