BioPython: Different test suite results when debuild and pdebuild

2014-04-25 Thread Andreas Tille
Hi,

I have started anyother try to finalise BioPython which is prepared at

  Vcs-Svn: 
svn://anonscm.debian.org/debian-med/trunk/packages/python-biopython/trunk/

I try to run as much tests of the test suite as possible in the build
process and I also added autopkgtest based on upstream's unit tests.
Strangely enough I have some different results when building with
debuild on my local *testing* installation and when building the package
in pbuilder *unstable* chroot when it comes to Python 3 (3.3 as well as
3.4).

Usually this is due to some missing build depends but I have no idea
which one this might be since all these errors are about
UnicodeDecodeError.  You might hopefully be able to reproduce this
by building the package using debuild which should work and compare
it by using pdebuild which shows some errors of type:

==
ERROR: test_ClustalOmega_tool
--
Traceback (most recent call last):
  File run_tests.py, line 407, in runTest
suite = unittest.TestLoader().loadTestsFromName(name)
  File /usr/lib/python3.3/unittest/loader.py, line 96, in loadTestsFromName
module = __import__('.'.join(parts_copy))
  File 
/tmp/buildd/python-biopython-1.63/.pybuild/pythonX.Y_3.3/build/Tests/test_ClustalOmega_tool.py,
 line 29, in module
output = getoutput(clustalo --help)
  File /usr/lib/python3.3/subprocess.py, line 703, in getoutput
return getstatusoutput(cmd)[1]
  File /usr/lib/python3.3/subprocess.py, line 684, in getstatusoutput
data = check_output(cmd, shell=True, universal_newlines=True, stderr=STDOUT)
  File /usr/lib/python3.3/subprocess.py, line 578, in check_output
output, unused_err = process.communicate(timeout=timeout)
  File /usr/lib/python3.3/subprocess.py, line 907, in communicate
stdout = _eintr_retry_call(self.stdout.read)
  File /usr/lib/python3.3/subprocess.py, line 479, in _eintr_retry_call
return func(*args)
  File /usr/lib/python3.3/encodings/ascii.py, line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 170: 
ordinal not in range(128)
==


I went via pbuilder hook into the schroot and tried to install
additional packages (for instance python3-unidecode which sounded
promising) but running the test manually via

   cd /tmp/buildd/python-biopython-1.63/Tests
   python3.3 run_tests.py -v test_ClustalOmega_tool

(while

   python run_tests.py -v test_ClustalOmega_tool

is running nicely).

So I wonder whether there is some missing Build-Depends which is
usually the case if it runs in debuild but not pdebuild or if there
is a new problem with encodings in unstable which simply does not
occure in testing.

Any help is welcome

 Andreas.

-- 
http://fam-tille.de


debuild_vs_run-unit-test.diff.gz
Description: Binary data


Re: BioPython: Different test suite results when debuild and pdebuild

2014-04-25 Thread Etienne Millon
Hi Andreas,

   File /usr/lib/python3.3/encodings/ascii.py, line 26, in decode
 return codecs.ascii_decode(input, self.errors)[0]

That's may be because pdebuild sets LC_ALL=C (see #376404). Python3
uses it to determine how it needs to print unicode. Here it tries to
decode it as ascii but this fails for characters outside of 0-127. It
already bit me once as the results are different in pbuilder and
sbuild.

A solution is to explicitly set LC_ALL to tell dh_auto_tests that the
terminal is able to interpret utf8:

LC_ALL=C.UTF-8 dh_auto_tests -- ...

HTH,

-- 
Etienne Millon


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140425085733.GA6329@klow



Re: BioPython: Different test suite results when debuild and pdebuild

2014-04-25 Thread Andreas Tille
On Fri, Apr 25, 2014 at 10:57:33AM +0200, Etienne Millon wrote:
 
 LC_ALL=C.UTF-8 dh_auto_tests -- ...

Works!

Thanks a lot for this really helpful hint

Andreas.

-- 
http://fam-tille.de


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140425094523.gb13...@an3as.eu