I am just learning how to do unit testing. I'm on the Python / nose / wing IDE.
( The project I'm writing tests on is a simulation system, and, among other things, allows you to run simulations both synchronously and asynchronously, and the simulation results should be the same in both.)
The fact is that some of my tests use simulation results that were created in other tests. For example, it synchronous_testcalculates a specific simulation in synchronous mode, but then I want to calculate it in asynchronous mode and verify that the results are the same.
How do I structure this? Do I put them all in one test function or create a separate one asynchronous_test? Am I passing these objects from one test function to another?
Also, keep in mind that all of these tests will go through the test generator, so I can run tests for each of the simulation packages included in my program.
source
share