Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

create common testing framework #33

Open
nathanfranklin opened this issue Jun 29, 2015 · 2 comments
Open

create common testing framework #33

nathanfranklin opened this issue Jun 29, 2015 · 2 comments

Comments

@nathanfranklin
Copy link
Member

create common testing framework for both test_internalwrapper.py and tests/test_controlwrapper.py whose code overlaps

@jmarcelogimenez
Copy link
Contributor

We have analyzed how to continue with the solution of this and other issues. It is true that the code of these tests overlap, but we do not have any reference about how to deal with this.
In the case of issue #32 we do not see another option than mix both pouiseille.py through a copy&paste of one along the other, in order to execute only once the test by the automatic checkers!. We think almost the same for this issue.
@khiltunen what do you think about this?
In terms of design, what's the problem with having two tests? considering that there are two different wrappers ...
In the case you need unify the test and you use an option to select the type of wrapper that you want to import, you still must call the unified example twice, each one with a different command line parameter (I/O and II) ...

@nathanfranklin
Copy link
Member Author

In terms of design, what's the problem with having two tests? considering that there are two different wrappers ...

Testing both wrappers to ensure that they both behave in the same manner is good. Here, the problem lies in the code duplication; the tests are identical (only which wrapper is running is different). By fixing this issue, maintenance of existing tests will be easier and it will also be easier to extend the tests as well.

We have analyzed how to continue with the solution of this and other issues. It is true that the code of these tests overlap, but we do not have any reference about how to deal with this.

For example, there is a file-io and internal wrapper for lammps where there are common tests that run for each wrapper. See https://github.com/simphony/simphony-lammps-md/blob/master/simlammps/tests/test_lammps_wrapper.py and https://github.com/simphony/simphony-lammps-md/blob/master/simlammps/testing/abc_lammps_md_engine_check.py. There are additional examples of testing templates in symphony-common for testing of the concrete classes of ABCMesh etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants