Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nosetests --with-nosedep <module> runs much more tests than asked for #14

Open
ydirson opened this issue Aug 4, 2020 · 1 comment
Open

Comments

@ydirson
Copy link

ydirson commented Aug 4, 2020

yann@yantop:omaha (wip/tori-ai<>)$ nosetests3
.........................................................................................................................
----------------------------------------------------------------------
Ran 121 tests in 5.007s

OK
$ nosetests3 Omaha.test
.......................................................................
----------------------------------------------------------------------
Ran 71 tests in 4.849s

OK
$ nosetests3 Omaha.test.test_torishogi
...
----------------------------------------------------------------------
Ran 3 tests in 0.523s

OK
$ nosetests3 --with-nosedep Omaha.test.test_torishogi
...........................................................................
----------------------------------------------------------------------
Ran 75 tests in 4.894s

OK

For now the only use of nosedep is in Omaha/test/test_torishogi.py:

@depends(after=test_loadpgn)
def test_undoredo():

See below the diff between the last 2 runs when using -v. You'll notice that the nosedep run does not include all of the tests of its supermodule, but also that some of those tests are run several times, and that the order of execution differs from the standard nosetests order, even for tests which do not make use of nosedep.

$ diff -u /tmp/nodeps-omaha /tmp/deps-tori
--- /tmp/nodeps-omaha   2020-08-04 19:41:46.467510379 +0200
+++ /tmp/deps-tori      2020-08-04 19:40:54.255121993 +0200
@@ -1,21 +1,33 @@
 Omaha.test.test_checkers.test_checkers ... ok
 Omaha.test.test_chess.test_chess ... ok
 Omaha.test.test_chess.test_loadpgn ... ok
-Omaha.test.test_chess5.test.test_enpassant ... ok
-Omaha.test.test_chess5.test.test_enpassant_delayed ... ok
-Omaha.test.test_chess5.test.test_enpassant_nonboost ... ok
-Omaha.test.test_chess5.test.test_pawn_check ... ok
-Omaha.test.test_chess5.test.test_undo_promotion ... ok
 Omaha.test.test_glinski.test00_hexbent_notation_a1.test_backnforth ... ok
 Omaha.test.test_glinski.test00_hexbent_notation_a6.test_backnforth ... ok
-Omaha.test.test_glinski.test00_hexbent_notation_f1.test_backnforth ... ok
 Omaha.test.test_glinski.test00_hexbent_notation_f11.test_backnforth ... ok
+Omaha.test.test_glinski.test00_hexbent_notation_f1.test_backnforth ... ok
 Omaha.test.test_glinski.test00_hexbent_notation_l1.test_backnforth ... ok
 Omaha.test.test_glinski.test00_hexbent_notation_l6.test_backnforth ... ok
 Omaha.test.test_glinski.test10_glinski ... ok
 Omaha.test.test_go.test_go ... ok 
-Omaha.test.test_go.test_nonstandardgo ... ok
 Omaha.test.test_go.test_loadsgf ... ok
+Omaha.test.test_go.test_nonstandardgo ... ok
+Omaha.test.test_minishogi.test.test_minishogi ... ok
+Omaha.test.test_minishogi.test.test_undo ... ok
+Omaha.test.test_minishogi.test_handicap ... ok
+Omaha.test.test_shogi.test_loadpgn ... ok
+Omaha.test.test_shoshogi.test_prince ... ok
+Omaha.test.test_shoshogi.test_shoshogi ... ok
+Omaha.test.test_torishogi.test_play.test_torishogi ... ok
+Omaha.test.test_torishogi.test_loadpgn ... ok
+Omaha.test.test_torishogi.test_undoredo ... ok
+Omaha.test.test_minishogi.test.test_minishogi ... ok
+Omaha.test.test_minishogi.test.test_undo ... ok
+Omaha.test.test_glinski.test00_hexbent_notation_a1.test_backnforth ... ok
+Omaha.test.test_glinski.test00_hexbent_notation_a6.test_backnforth ... ok
+Omaha.test.test_glinski.test00_hexbent_notation_f1.test_backnforth ... ok
+Omaha.test.test_glinski.test00_hexbent_notation_f11.test_backnforth ... ok
+Omaha.test.test_glinski.test00_hexbent_notation_l1.test_backnforth ... ok
+Omaha.test.test_glinski.test00_hexbent_notation_l6.test_backnforth ... ok
 Omaha.test.test_import.test_Apps.test_QtLauncher ... ok
 Omaha.test.test_import.test_Apps.test_QtPlay ... ok
 Omaha.test.test_import.test_CheckersPlayerDrivers.test_ManualEntry ... ok
@@ -60,17 +72,9 @@
 Omaha.test.test_import.test_ShogiPlayerDrivers.test_Multiplexer ... ok
 Omaha.test.test_import.test_ShogiPlayerDrivers.test_Stdin ... ok
 Omaha.test.test_import.test_ShogiPlayerDrivers.test_XShogi ... ok
-Omaha.test.test_minishogi.test.test_minishogi ... ok
-Omaha.test.test_minishogi.test.test_undo ... ok
-Omaha.test.test_minishogi.test_handicap ... ok
-Omaha.test.test_shogi.test_loadpgn ... ok
-Omaha.test.test_shoshogi.test_shoshogi ... ok
-Omaha.test.test_shoshogi.test_prince ... ok
 Omaha.test.test_torishogi.test_play.test_torishogi ... ok
-Omaha.test.test_torishogi.test_loadpgn ... ok
-Omaha.test.test_torishogi.test_undoredo ... ok

 ----------------------------------------------------------------------
-Ran 71 tests in 4.914s
+Ran 75 tests in 4.940s
@Zitrax
Copy link
Owner

Zitrax commented Aug 9, 2020

Hi, this does sound similar to #13 which links to a proposed fix. Maybe it would be possible for you to see if that helps?

Looks like that fix was never included in a release, so would be interesting to know if solves this as well.

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

No branches or pull requests

2 participants