New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JUnitReporter fails with Python 3.x #82
Comments
I actually tried to somehow run that from source and I observed some other incompatibilities:
|
behave is currently distributed as Python2 source code. To convert the source distribution run:
NOTE: SEE ALSO: |
One additional note over which I stumbled during the last few days. |
I have managed to get JUnitReporter working in python3. For this i had to fix 2 problems:
|
I'm seeing this issue with Python 3.3:
@aragaer When I step through the code, Setting to the file handler to |
This is the patch I'm manually applying to get JUnit reporter work:
|
Thanks @aragaer ! What about submitting a pull request for this change? |
I doubt this patch will not break compatibility with Python 2. |
Have any of you considered using lxml? I just tried it out to get proper line break printing for CDATA sections. It seems to work nicely without any of the class/method overloading stuff. Ref: https://github.com/midopa/behave/commit/0e309fec4f7e6ede4582c4e7d8a09ad4b43809f6 |
Actually, scratch that. I just checked and the CDATA is alright with the current implementation. Chrome was just mangling all the line breaks. That said, lxml does make it a bit simpler by removing the need to have custom CDATA classes and serialization overloading and presumably it's faster? |
@midopa |
I second this request. Since behave works fine with Python 3, I'd greatly appreciate the availability to have it generate JUnit files as well. |
Same here with Python 3.4. When I set the
As soon as I switch back to Python 2.7, everything works fine. |
@benoitroussel |
Thanks a lot @jenisys ! |
|
@aragaer |
Python's |
@jenisys |
@nikhil2712 it should be fixed with this commit: |
When you use
behave --junit ...
with Python 3.x you get an exception related to XML/Unicode.SEE ALSO:
Issue #80 comment.
The text was updated successfully, but these errors were encountered: