Closed nmb10 closed 8 years ago
Done. Using memory path instead of syspath for memoryfs while compiling casters code.
On Nov 5, 2015, at 10:11 AM, Kazbek notifications@github.com wrote:
test_pipe_config for example.
These particular NoSysPath errors are due to a bad interaction with some improvements to imported code ( bundle.py and some others ) that expect the code to be on a real file system. But, there is a deeper problem with tests; they’ve gotten really message and disjointed.
Was was working on adding a test feature to the bundle builds, to test that a bundle built correctly, and I realized that nearly all of our functional tests could be implemented in it. So, I’m adding a new bundle file, test.py, which, if it exists, holds a unittest.TestCase that gets the currentl bundle injected, with decorators to mark tests to be run at certain times. For instance:
class Test(BundleTest):
@before_ingest() def test_before_ingest(self): print 'BEFORE INGEST', self.bundle.identity @before_ingest() def test_before_ingest(self): self.assertTrue(False) @after_ingest() def test_after_ingest(self): print 'AFTER INGEST', self.bundle.identity x = 1/0
I’m writing up a guide to the system, and I’d like to move all of the functional tests to it. Then, I’d like to separate out the unit tests, so they are run independently from the functional tests. Because the functional tests are integrated into the bundles, the process for running them will be to load all of the test bundles into a library and run them in the library. In production, you’d do the same thing to ensure that data is correctly loaded into a bundle.
I’ll probably have that all done by the weekend.
eric.
Eric Busboom (619) 363 2607
eric@busboom.org http://www.busboom.org
test_pipe_config for example.
Error: