self.carbonate_sdk = carbonate.SDK(# ...# This will store the files in a directory named after the test file cache_dir=os.path.join(os.path.splitext(__file__)),)
This directory, and the resulting cached test scripts, should be committed to your source control system.
Invalidating the cache
When you change your HTML significantly, your tests will start to fail since the tests are testing the old HTML. If this is expected, you can invalidate the cache by deleting the appropriate directory. This will force the SDK to re-extract a new test script the next time it is run.
Invalidating the cache of an entire test case
For example, if you wish to invalidate the cache for the tests contained within test/test_my_test.py, you should delete the test/test_my_test directory: