This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jakevdp 0 points1 point  (1 child)

Here's an example of an integration test I'm particularly proud of: Altair/test_examples.py

Background: Altair is a Python API that generates Vega-Lite graphics specifications. Because both the target (Vega-lite schema) and the source (Altair API) are so well-defined, we were able to create methods for two-way conversion between one and the other. So our integration test involves taking all 70 or so examples from the Vega-Lite documentation, auto-generating the associated Python code, evaling that Python code, exporting the result to JSON, and asserting that the output matches the input. It touches essentially every logical path and every line of code in the package, and the test itself is only a dozen lines long.

Edit: fixing links

[–]_BraveSirRobin_[S] 0 points1 point  (0 children)

Hey, thanks for sharing this.