#21012: doctest in game theory requires nash
------------------------------+----------------------------------
Reporter: vdelecroix | Type: defect
Status: new | Priority: critical
Milestone: sage-7.3 | Component: packages: optional
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------+----------------------------------
On a fresh install of Sage with the package lrslib installed many doctests
in `game_theory` fail.
{{{
Running doctests with ID 2016-07-13-05-05-59-2a599c24.
Git branch: patchbot/ticket_merged
Using
--optional=4ti2,bliss,cbc,database_gap,gap_packages,igraph,lrslib,mpir,normaliz,nose,ore_algebra,patchbot,plantri,python2,qepcad,saclib,sage,threejs,tides
Doctesting 9 files.
sage -t --long --warn-long 62.7 game_theory/catalog_normal_form_games.py
**********************************************************************
File "game_theory/catalog_normal_form_games.py", line 12, in
sage.game_theory.catalog_normal_form_games
Failed example:
g.obtain_nash()
Exception raised:
Traceback (most recent call last):
File "/home/vincent/sage_patchbot/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 498, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/home/vincent/sage_patchbot/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 861, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.game_theory.catalog_normal_form_games[2]>", line
1, in <module>
g.obtain_nash()
File "/home/vincent/sage_patchbot/local/lib/python2.7/site-
packages/sage/game_theory/normal_form_game.py", line 1328, in obtain_nash
return self._solve_lrs(maximization)
File "/home/vincent/sage_patchbot/local/lib/python2.7/site-
packages/sage/game_theory/normal_form_game.py", line 1400, in _solve_lrs
process = Popen(['nash', g1_name, g2_name], stdout=PIPE)
File "/home/vincent/sage_patchbot/local/lib/python/subprocess.py",
line 710, in __init__
errread, errwrite)
File "/home/vincent/sage_patchbot/local/lib/python/subprocess.py",
line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
**********************************************************************
...
----------------------------------------------------------------------
sage -t --long --warn-long 62.7 game_theory/catalog_normal_form_games.py
# 19 doctests failed
sage -t --long --warn-long 62.7 game_theory/normal_form_game.py # 19
doctests failed
sage -t --long --warn-long 62.7 game_theory/parser.py # 10 doctests
failed
}}}
The reason is that the package `lrslib` provides the binary `lrsnash` but
not `nash`. And the latter is used in called in `_solve_lrs` in the source
code. Hence either the optional tag `# optional - lrslib` is wrong or
`lrsnash` should be used.
--
Ticket URL: <https://trac.sagemath.org/ticket/21012>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.