#14408: Upgrade dot2tex spkg to latest development version
--------------------------------------+-------------------------------------
Reporter: nthiery | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-5.10
Component: packages: optional | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: #14594 | Stopgaps:
--------------------------------------+-------------------------------------
Comment (by leif):
Besides having to rebase the "use matplotlib" patch (now also patching
`dot2tex/__init__.py`, which meanwhile has ''DOS'' line endings 8-/ ), I'm
''of course^TM^'' getting new, partially weird(?) test suite failures:
{{{
############################################################
spkg-check: Running test_dot2tex.py...
############################################################
.FF....FFERROR Could not open input file dymmy.dot
E.WARNING Invalid prog=dummy
FE.....F.....FERROR Failed to process input
Traceback (most recent call last):
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2928, in main
s = conv.convert(dotdata)
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 794, in convert
return self.do_preview_preproc()
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 1062, in do_preview_preproc
code = self.get_node_preproc_code(node)
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2155, in get_node_preproc_code
(style, label)
TypeError: not enough arguments for format string
.ERROR Failed to process input
Traceback (most recent call last):
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2928, in main
s = conv.convert(dotdata)
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 848, in convert
return self.output()
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2566, in output
positions[node.name] = map(int, pos.split(','))
ValueError: invalid literal for int() with base 10: '30.139'
FF..
======================================================================
ERROR: test_no_input_file (__main__.ErrorHandlingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 194, in test_no_input_file
self.assertRaises(IOError, dot2tex.dot2tex, graph)
File "${SAGE_ROOT}/local/lib/python/unittest/case.py", line 476, in
assertRaises
callableObj(*args, **kwargs)
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/__init__.py", line 66, in dot2tex
return d2t.convert_graph(dotsource, **kwargs)
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2966, in convert_graph
tex = main(True, dotsource,options)
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2842, in main
dotdata = load_dot_file(filename)
File "${SAGE_ROOT}/local/lib/python2.7/site-
packages/dot2tex/dot2tex.py", line 2769, in load_dot_file
sys.exit(1)
SystemExit: 1
======================================================================
ERROR: test_prog_options (__main__.GraphvizInterfaceTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 216, in test_prog_options
xdot_data2 = create_xdot(testgraph, options='-y')
TypeError: create_xdot() got an unexpected keyword argument 'options'
======================================================================
FAIL: test__dim_extraction_cygwin (__main__.AutosizeTests)
Failed to extract dimension data from logfile generated under Cygwin
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 342, in test__dim_extraction_cygwin
self.failIf(len(texdimdata) == 0)
AssertionError: True is not false
======================================================================
FAIL: test_name_with_parantheses (__main__.BuggyGraphTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 110, in test_name_with_parantheses
self.failUnless(r'\node (F{K}/R-1)' in source)
AssertionError: False is not true
======================================================================
FAIL: test_edgetexlbl_nolabel_preproc (__main__.EdgeLabelsTests)
Edge labels specified using 'texlbl' should be included when preprocessing
the graph
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 201, in test_edgetexlbl_nolabel_preproc
self.failUnless("TestLabel" in code)
AssertionError: False is not true
======================================================================
FAIL: test_module_parse_error (__main__.ErrorHandlingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 190, in test_module_parse_error
self.assertRaises(dot2tex.ParseException, dot2tex.dot2tex, graph)
AssertionError: ParseException not raised
======================================================================
FAIL: test_invalid_program (__main__.GraphvizInterfaceTests)
Invoking create_xdot with an invalid prog parameter should raise an
exception
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 224, in test_invalid_program
self.assertRaises(NameError, create_xdot, testgraph, prog="dummy")
AssertionError: NameError not raised
======================================================================
FAIL: test_semicolon (__main__.MultipleStatements)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 154, in test_semicolon
self.failUnless(source1==source2)
AssertionError: False is not true
======================================================================
FAIL: test_head_and_tail_labels (__main__.TestBugs)
Test for issue 30
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 370, in test_head_and_tail_labels
self.assertTrue('HEADLABEL' in code)
AssertionError: False is not true
======================================================================
FAIL: test_floating_point_coordinates (__main__.TestPositionsOutputFormat)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 172, in test_floating_point_coordinates
self.failUnless(type(positions)==dict)
AssertionError: False is not true
======================================================================
FAIL: test_point_shape (__main__.TikZTemplateTests)
Nodes with the point shape should not have labels
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dot2tex.py", line 358, in test_point_shape
self.failIf("dummy" in code)
AssertionError: True is not false
----------------------------------------------------------------------
Ran 30 tests in 19.202s
FAILED (failures=9, errors=2)
############################################################
spkg-check: Running test_dotparsing.py...
############################################################
F...E.E.......F.
======================================================================
ERROR: test_add_node (__main__.DotGraphTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dotparsing.py", line 75, in test_add_node
self.assertEqual(len(g.nodes),2)
TypeError: object of type 'generator' has no len()
======================================================================
ERROR: test_addequalnodes (__main__.DotGraphTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dotparsing.py", line 84, in test_addequalnodes
self.assertEqual(len(g.nodes),1)
TypeError: object of type 'generator' has no len()
======================================================================
FAIL: test_add_default (__main__.DotDefaultAttrTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dotparsing.py", line 131, in test_add_default
self.assertEqual(len(g.default_graph_attr),1)
AssertionError: 0 != 1
======================================================================
FAIL: test_add_edge_to_subgraph (__main__.DotSubgraphsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_dotparsing.py", line 116, in test_add_edge_to_subgraph
self.assertEqual(len(g),2)
AssertionError: 0 != 2
----------------------------------------------------------------------
Ran 16 tests in 0.016s
FAILED (failures=2, errors=2)
}}}
(The other four of now six tests in `tests/` [still] pass for me.)
Not sure how we should handle these ... (patching / fixing the tests,
skipping some, ...)
Haven't tried to run doctests yet.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14408#comment:11>
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 http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.