Comments (8)
maybe a straightforward thing, but I would say that the test should be reproducible (though it is not always possible)
from espressopp.
@niktre What do you mean by reproducible, exactly? If a unit test isn't reproducible, then it will always fail, right? And that will make it useless as a unit test.
from espressopp.
Some of the existing unit tests are pretty slow (pi_water and polymer_melt_tabulated are 30-40 seconds each). Moreover they don't seem to actually test for anything except "runs for N steps without crashing". Does anyone know if there's some reason they're written that way that I'm not understanding? If not I'll just reduce the number of steps.
from espressopp.
Most of the current tests were just examples, which I turned into regression tests, half of them compare against some reference data, but by no means are these unittests!
from espressopp.
When I first started writing unit tests for recent commits, my main confusion was that half the stuff in the testsuite didn't seem to actually BE unit tests... Now I get it!
I think @MrTheodor recent commits are good examples of unittests for us all to copy. What do you all think?
from espressopp.
Agreed! Long term, I would like to separate unit and regression tests, but for now mixed tests are better than no tests.
from espressopp.
- How short should the tests be? It there an upper limit? 1 sec?
- Should they test "physics" or not? An example: at the moment I have an LB test that runs small stochastic LB liquid and calculates after short run the average density and momentum. Then I compare them with the initial ones, so that I know, that there is no mass or momentum leak in the system. Is this test ok?
from espressopp.
@niktre Currently travis has a limit of 50min for build; but I wouldn't restrict time at this stage. We don't have problems with long tests but with missing tests.
Ad 2. I think that's important that the physics behind is correctly tested, this should be also the case of the interactions. As we deal with mixed environment and the tests run on Python level, we actually test the interface and the results of operations at that level.
from espressopp.
Related Issues (20)
- At least throw a warning
- WEEKLY CI jobs are broken HOT 5
- Boost bind HOT 4
- update espressopp spackage
- spack for development
- Generate version in version.hpp from CMake
- opensuse build fails HOT 15
- Possible bug report to CoulombKSpaceEwald.hpp
- h5md_parallel test fails HOT 8
- Buffer Overflow in NumPy HOT 1
- weekly build fails openSUSE HOT 4
- Wrong angular potential in ring polymer melts
- Do we need Pipfile and Pipfile.lock? HOT 3
- Bug fixes to CoulombKSpaceP3M
- Weekly CI fails HOT 1
- weekly: argument 1 null where non-null expected
- installation on a fresh ubuntu VM results in error HOT 8
- bug in hierarchical_strategy_for_one-component example
- GROMACS issue - Help Needed !!! HOT 7
- Make Error: Linking CXX executable RealNDTest HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espressopp.