Linux users: please run gui tests

Peter Otten __peter__ at web.de
Fri Aug 7 15:06:41 CEST 2015


Laura Creighton wrote:

> In a message of Fri, 07 Aug 2015 19:51:51 +1000, Chris Angelico writes:
>>On Fri, Aug 7, 2015 at 7:15 PM, Peter Otten <__peter__ at web.de> wrote:
>>> By default Debian doesn't install the test suite -- that's why you
>>> cannot run it ;)
>>>
>>> Install it with
>>>
>>> $ sudo apt-get install libpython3.4-testsuite
>>>
>>> and then try again.
>>
>>Which makes it work fine on my system.
>>
>>ChrisA
> 
> Not here.
> 
> I'm running debian unstable (jessie)
> I've already got libpython3.4-testsuite installed, and I cannot run
> the tests.
> 
> lac at smartwheels:~$ lsb_release -a
> LSB Version:	  
> core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-
amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-
amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-
amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
> Distributor ID:	   Debian
> Description:	   Debian GNU/Linux 8.0 (jessie)
> Release:	   8.0
> Codename:	   jessie
> 
> lac at smartwheels:~$ cat /proc/version
> Linux version 3.16.0-4-amd64 (debian-kernel at lists.debian.org)
> (gcc version 4.8.4  (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt9-2
> (2015-04-13)
> 
> lac at smartwheels:~$ python3 --version
> Python 3.4.3+
> 
> I have the lastest version of libpython3.4-testsuite installed.
> lac at smartwheels:~$ apt-cache policy libpython3.4-testsuite
> libpython3.4-testsuite:
>   Installed: 3.4.3-8
>   Candidate: 3.4.3-8
>   Version table:
>  *** 3.4.3-8 0
>        500 http://ftp.se.debian.org/debian/ unstable/main amd64 Packages
>        500 http://ftp.debian.org/debian/ unstable/main amd64 Packages
>        100 /var/lib/dpkg/status
> 
> This is a brand new terminal window, i.e. I am not sitting in a virtualenv
> that I have completely forgotten about.
> 
> But I still get:
> lac at smartwheels:~$ python3 -m test -ugui test_tk test_ttk_guionly
> test_idle /usr/bin/python3: Error while finding spec for 'test.__main__'
> (<class 'ImportError'>: bad magic number in 'test': b'\x03\xf3\r\n');
> 'test' is a package and cannot be directly executed
> 
> Now I am very puzzled.  What else could I be missing to cause this?

I can provoke something similar with

$ touch test.py
$ python -c import\ test
$ rm test.py
$ python3 -m test -ugui test_tk
/usr/bin/python3: bad magic number in 'test': b'\x03\xf3\r\n'

>From that I'd conclude that your python3 sees a leftover python2 pyc instead 
of the actual test package. Have a look at your working directory or 
PYTHONPATH.



More information about the Python-list mailing list