[Biopython-dev] Jython 2.7b2 - test_NCBITextParser.py and test_Pathway.py

Peter Cock p.j.a.cock at googlemail.com
Wed May 7 16:50:40 UTC 2014


Jython lives! http://fwierzbicki.blogspot.co.uk/2014/05/jython-27-beta2-released.html

I just tried Jython 2.7b2 on Mac OS X, and mostly things work :)

test_NCBITextParser.py fails due to some long methods, see
http://bugs.jython.org/issue1891 and our past hacks, e.g.
https://github.com/biopython/biopython/commit/deb14b29ac35b9ed74911bf0c17355a0e9bc4f21
https://github.com/biopython/biopython/commit/7e614c149a1bf0dfe80d77b1021a6cca508fdd10

(This looks like a regression in Jython being stricter here, since
the error doesn't say which method(s) are too long, fixing this
is a bit painful... perhaps counting lines per method would
spot the problem methods nicely?)

Separately, test_Pathway.py is failing which looks more
interesting... details below.

Peter

--

$ jython2.7 test_Pathway.py
testEdges (__main__.GraphTestCase) ... FAIL
testEquals (__main__.GraphTestCase) ... ok
testNodes (__main__.GraphTestCase) ... ok
testRemoveNode (__main__.GraphTestCase) ... FAIL
testEdges (__main__.MultiGraphTestCase) ... FAIL
testEquals (__main__.MultiGraphTestCase) ... ok
testNodes (__main__.MultiGraphTestCase) ... ok
testRemoveNode (__main__.MultiGraphTestCase) ... FAIL
testEq (__main__.ReactionTestCase) ... ok
testRev (__main__.ReactionTestCase) ... ok

======================================================================
FAIL: testEdges (__main__.GraphTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_Pathway.py", line 53, in testEdges
    self.assertEqual(a.parent_edges('a'), [('b', 'label2')])  # ,
"incorrect parent edges")
AssertionError: Lists differ: [] != [('b', 'label2')]

Second list contains 1 additional elements.
First extra element 0:
('b', 'label2')

- []
+ [('b', 'label2')]

======================================================================
FAIL: testRemoveNode (__main__.GraphTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_Pathway.py", line 72, in testRemoveNode
    self.assertEqual(a, b)  # , "incorrect node removal")
AssertionError: <Bio.Pathway.Rep.Graph.Graph object at 0x7> !=
<Bio.Pathway.Rep.Graph.Graph object at 0x8>

======================================================================
FAIL: testEdges (__main__.MultiGraphTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_Pathway.py", line 116, in testEdges
    self.assertEqual(a.parent_edges('a'), [('b', 'label2')])  # ,
"incorrect parent edges")
AssertionError: Lists differ: [] != [('b', 'label2')]

Second list contains 1 additional elements.
First extra element 0:
('b', 'label2')

- []
+ [('b', 'label2')]

======================================================================
FAIL: testRemoveNode (__main__.MultiGraphTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_Pathway.py", line 136, in testRemoveNode
    self.assertEqual(repr(a), "<MultiGraph: ('a': ('b',
'label5'))('b': )('c': )('d': )>")
AssertionError: "<MultiGraph: ('a': ('b', 'label5'),('e',
'label1'))('b': ('e', 'label1'))('c': ('e', 'label2'))('d': ('e',
'label3'))>" != "<MultiGraph: ('a': ('b', 'label5'))('b': )('c':
)('d': )>"

----------------------------------------------------------------------
Ran 10 tests in 0.046s

FAILED (failures=4)



More information about the Biopython-dev mailing list