Hi all, I am playing around with the new biopython spkg (1.52). In particular, I would like to have a spkg-check script to run the included tests. This mostly works and the test skips testing modules that are not installed. I am having one problem however. I get a failure with one test.
====================================================================== FAIL: Doctest: Bio.Wise._build_align_cmdline ---------------------------------------------------------------------- Traceback (most recent call last): File ".../download/sage-4.1.2.rc0/local/lib/python/doctest.py", line 2145, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for Bio.Wise._build_align_cmdline File ".../download/sage-4.1.2.rc0/spkg/build/biopython-1.52/src/ build/lib.linux-i686-2.6/Bio/Wise/__init__.py", line 23, in _build_align_cmdline ---------------------------------------------------------------------- File ".../download/sage-4.1.2.rc0/spkg/build/biopython-1.52/src/build/ lib.linux-i686-2.6/Bio/Wise/__init__.py", line 26, in Bio.Wise._build_align_cmdline Failed example: _build_align_cmdline(["dnal"], ("seq1.fna", "seq2.fna"), "/tmp/ output", kbyte=100000) Expected: 'dnal -kbyte 100000 seq1.fna seq2.fna > /tmp/output' Got: 'dnal -kbyte 100000 -quiet seq1.fna seq2.fna > /tmp/output' ---------------------------------------------------------------------- File ".../download/sage-4.1.2.rc0/spkg/build/biopython-1.52/src/build/ lib.linux-i686-2.6/Bio/Wise/__init__.py", line 28, in Bio.Wise._build_align_cmdline Failed example: _build_align_cmdline(["psw"], ("seq1.faa", "seq2.faa"), "/tmp/ output_aa") Expected: 'psw -kbyte 300000 seq1.faa seq2.faa > /tmp/output_aa' Got: 'psw -kbyte 300000 -quiet seq1.faa seq2.faa > /tmp/output_aa' ---------------------------------------------------------------------- The reason is that there is an "if not os.isatty(sys.stderr.fileno ()):" test in the function that adds a -quiet to the string. This test passes if the script runs directly from the command line but fails when using 'sage -f'. I am not sure what can be done to change this as I am not a bash expert. My simple solution would be to just add a message like "Note: There is one expected failure with Doctest: Bio.Wise._build_align_cmdline. Other test failures should be examined." and continue. This fail is purely an artifact of how the testing takes place. However, if there is a better solution than I would like to do that. Cheers, Adam --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---