ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Tests are broken with Py3k #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version: 1.0.2

Running "python3.2 tests/client_0_8/run_all.py" produce a syntax error because 
u"str" is not supported by python 3.

I attached a small patch that fix this issue.

Original issue reported on code.google.com by corentin...@gmail.com on 4 Mar 2012 at 10:40

GoogleCodeExporter commented 9 years ago
Patch available at: http://xf.iksaif.net/bordel/fix-amqplib-tests.patch

Original comment by corentin...@gmail.com on 4 Mar 2012 at 10:41

GoogleCodeExporter commented 9 years ago
Py3k is already supported by by running the "2to3" utility that comes with 
Python 3.x and Python 2.6+.  For example, I run

  cd amqplib-1.0.2
  2to3-3.2 -w amqplib
  2to3-3.2 -w tests

and it fixes all those u"str" type incompatibilities in the library and 
unittests, and they all pass.

Original comment by barry.pe...@gmail.com on 5 Mar 2012 at 1:33

GoogleCodeExporter commented 9 years ago
Ok, could the fact that 2to3 should be ran on tests be documented somewhere ? 
It would also be great if "setup.py test" was working as excepted (doing the 
2to3 in the way).

Original comment by corentin...@gmail.com on 5 Mar 2012 at 6:33

GoogleCodeExporter commented 9 years ago
Yes, it should be documented I guess, and the "setup.py test" thing is 
something that I haven't worked with, but definitely sounds useful, and I'd 
like to figure out.

Anyone else attending pycon?  I'm at a session on testing, so hopefully this 
will inspire me to take this testing thing more seriously.

Original comment by barry.pe...@gmail.com on 9 Mar 2012 at 6:58