thegooglecodearchive / sfepy

Automatically exported from code.google.com/p/sfepy
0 stars 0 forks source link

make ./runTests.py --filter-more the default? #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I suggest this behavior:

$ ./runTests.py
<<< directory: tests, test files: 14
+++ test_structAdd: ok
+++ test_structIAdd: ok
+++ test_linear_terms: ok
+++ test_input: ok
+++ test_input: ok
+++ test_input: ok
+++ test_input: ok
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
+++ test_linearRigidBodyBC: ok
+++ test_linearRigidBodyBC: ok
+++ test_readMeshes: ok
+++ test_compareSameMeshes: ok
+++ test_parseEquations: ok
+++ test_parseRegions: ok
+++ test_pbc: ok
+++ test_pbc: ok
+++ test_problemCreation: ok
14 test file(s) executed in 13.56 s, 0 failure(s) of 18 test(s)

Currently the above command prints a lot of info. 

I think when executing tests, it's important you run one simple command,
that doesn't print a lot of garbage, so that I can easily see - all is
ok/something went wrong (-> investigate).

Original issue reported on code.google.com by ondrej.c...@gmail.com on 5 Feb 2008 at 1:56

GoogleCodeExporter commented 9 years ago
This might be better, as the test file names are visible:

{{{
$ ./runTests.py --filter-more
<<< directory: tests, test files: 14
<<< tests/test_input_kostka.py
+++ test_input: ok
<<< tests/test_input_navier_stokes.py
+++ test_input: ok
<<< tests/test_input_poisson.py
+++ test_input: ok
<<< tests/test_elasticity_small_strain.py
+++ test_linear_terms: ok
<<< tests/test_quadratures.py
+++ test_problemCreation: ok
<<< tests/test_io.py
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
<<< tests/test_parsing.py
+++ test_parseEquations: ok
+++ test_parseRegions: ok
<<< tests/test_periodic_bc_3d.py
+++ test_pbc: ok
<<< tests/test_lcbc_2d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_periodic_bc_2d.py
+++ test_pbc: ok
<<< tests/test_input_le.py
+++ test_input: ok
<<< tests/test_base.py
+++ test_structAdd: ok
+++ test_structIAdd: ok
<<< tests/test_lcbc_3d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_meshio.py
+++ test_readMeshes: ok
+++ test_compareSameMeshes: ok
14 test file(s) executed in 22.92 s, 0 failure(s) of 18 test(s)
}}}

Do you agree?

Original comment by robert.c...@gmail.com on 5 Feb 2008 at 2:07

GoogleCodeExporter commented 9 years ago
I have commited the change (options are now --filter-none, --filter-less,
--filter-more). This is imho both informative and terse enough...

Original comment by robert.c...@gmail.com on 5 Feb 2008 at 2:34

GoogleCodeExporter commented 9 years ago
Excellent! The default behavior is now:

$ ./runTests.py 
<<< directory: tests, test files: 14
<<< tests/test_base.py
+++ test_structAdd: ok
+++ test_structIAdd: ok
<<< tests/test_elasticity_small_strain.py
+++ test_linear_terms: ok
<<< tests/test_input_kostka.py
+++ test_input: ok
<<< tests/test_input_le.py
+++ test_input: ok
<<< tests/test_input_navier_stokes.py
+++ test_input: ok
<<< tests/test_input_poisson.py
+++ test_input: ok
<<< tests/test_io.py
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
<<< tests/test_lcbc_2d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_lcbc_3d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_meshio.py
+++ test_readMeshes: ok
+++ test_compareSameMeshes: ok
<<< tests/test_parsing.py
+++ test_parseEquations: ok
+++ test_parseRegions: ok
<<< tests/test_periodic_bc_2d.py
+++ test_pbc: ok
<<< tests/test_periodic_bc_3d.py
+++ test_pbc: ok
<<< tests/test_quadratures.py
+++ test_problemCreation: ok
14 test file(s) executed in 13.55 s, 0 failure(s) of 18 test(s)

Test file names should be visible, but the <<< and +++ syntax is kind of messy.

How about the following syntax:

+++ tests/test_base.py: test_structAdd: ok
+++ tests/test_base.py: test_structIAdd: ok
+++ tests/test_lcbc_3d.py: test_linearRigidBodyBC: ok
+++ tests/test_meshio.py: test_readMeshes: ok
+++ tests/test_meshio.py: ttest_compareSameMeshes: ok

or this syntax:

tests/test_base.py: 
    +++ test_structAdd: ok
    +++ test_structIAdd: ok
tests/test_lcbc_3d.py:
    +++ test_linearRigidBodyBC: ok
tests/test_meshio.py:
    +++ test_readMeshes: ok
    +++ ttest_compareSameMeshes: ok

Original comment by ondrej.c...@gmail.com on 5 Feb 2008 at 3:16

GoogleCodeExporter commented 9 years ago
When this is resolved, let's update the examples wiki page with the final 
syntax,
only then close this issue.

Original comment by ondrej.c...@gmail.com on 5 Feb 2008 at 3:23

GoogleCodeExporter commented 9 years ago
It could be done. But how would you format the other output options then? The 
current
implementation is very simple...

Original comment by robert.c...@gmail.com on 5 Feb 2008 at 3:33

GoogleCodeExporter commented 9 years ago
or this?

<<< directory: tests, test files: 14
<<< tests/test_input_kostka.py
+++      test_input: ok
<<< tests/test_input_navier_stokes.py
+++      test_input: ok
<<< tests/test_input_poisson.py
+++      test_input: ok

with --filter-less:

<<< directory: tests, test files: 14
<<< tests/test_input_kostka.py
>>> test instance prepared (1 test(s))
...      solving input/kostka.py...
...      input/kostka.py solved
+++      test_input: ok
>>> all passed in 0.92 s

and with --filter-more:

<<< directory: tests, test files: 14
+++      test_input: ok
---      test_input: failed!
---      test_input: failed!
---      test_linear_terms: failed!
+++      test_problemCreation: ok
+++      test_recursiveDictHDF5: ok

Original comment by robert.c...@gmail.com on 5 Feb 2008 at 3:41

GoogleCodeExporter commented 9 years ago
I like your first example in the comment 6 but with a substitution "   " for 
"<<<".

I just want to quickly glance at the results and see if all is ok. All rubish, 
like
"<<<" makes this more difficult imho.

Original comment by ondrej.c...@gmail.com on 5 Feb 2008 at 3:48

GoogleCodeExporter commented 9 years ago
try the new version - it looks ok with all the options. if you agree, could you
update the example and close the issue?

Original comment by robert.c...@gmail.com on 5 Feb 2008 at 4:20

GoogleCodeExporter commented 9 years ago
Perfect, thanks for the fix:

$ ./runTests.py 
<<< directory: tests, test files: 14
tests/test_base.py
+++   test_structAdd: ok
+++   test_structIAdd: ok
tests/test_elasticity_small_strain.py
+++   test_linear_terms: ok
tests/test_input_kostka.py
+++   test_input: ok
tests/test_input_le.py
+++   test_input: ok
tests/test_input_navier_stokes.py
+++   test_input: ok
tests/test_input_poisson.py
+++   test_input: ok
tests/test_io.py
+++   test_recursiveDictHDF5: ok
+++   test_sparseMatrixHDF5: ok
tests/test_lcbc_2d.py
+++   test_linearRigidBodyBC: ok
tests/test_lcbc_3d.py
+++   test_linearRigidBodyBC: ok
tests/test_meshio.py
+++   test_readMeshes: ok
+++   test_compareSameMeshes: ok
tests/test_parsing.py
+++   test_parseEquations: ok
+++   test_parseRegions: ok
tests/test_periodic_bc_2d.py
+++   test_pbc: ok
tests/test_periodic_bc_3d.py
+++   test_pbc: ok
tests/test_quadratures.py
+++   test_problemCreation: ok
14 test file(s) executed in 13.57 s, 0 failure(s) of 18 test(s)

Wiki fixed.

Original comment by ondrej.c...@gmail.com on 5 Feb 2008 at 4:28

GoogleCodeExporter commented 9 years ago
Migrated to http://github.com/sfepy/sfepy/issues/17

Original comment by robert.c...@gmail.com on 30 Jan 2012 at 10:23