Skip to content
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

Roundtrip tests between different Py versions #69

Open
oberstet opened this issue Jun 7, 2017 · 3 comments
Open

Roundtrip tests between different Py versions #69

oberstet opened this issue Jun 7, 2017 · 3 comments

Comments

@oberstet
Copy link

oberstet commented Jun 7, 2017

Split out from #11

I only have sketchy knowledge about dbus and stuff, haven't looked deeply enough into the txdbus codebase, but are the unit tests actually talk to a real dbus? and if so, are there tests that

  • roundtrip Py2 -> dbus -> Py2 (and Py3 -> dbus -> Py3) - eg both a proc implemented in Py and called from Py
  • roundtrip Py2 -> dbus -> Py3 (and Py3 -> dbus -> Py2)

What I meant with round-tripping is between different Python versions.

Like have a procedure implemented in Python 3, exposed via Dbus, and being called from Python 2.

Where the procedure name is a fancy Unicode name, and/or the procedure takes an Unicode argument (and the test actually uses non-US-ASCII characters) and/or the procedure takes a binary argument (and the test actually uses a binary value which isn't valid UTF8).

@cocagne
Copy link
Owner

cocagne commented Jun 11, 2017 via email

@oberstet
Copy link
Author

oberstet commented Jun 11, 2017

Regarding round-tripping tests on same Python version, is the following a glitch? A bytes value of length 0 (b'') behaves differently on the two:

Testing across different Python version is more complicated, I agree. One way that should work would be creating two virtualenv inside the Travis CI container with two different Python versions, and then drive the test from either side, effectively testing Python 2 unit tests versus Python 3 txdbus and vice versa. If we could do that, and have a single code base for both the library and the unit tests, then I think that would clearly demonstrate full support for both Python versions.

@WhyNotHugo
Copy link
Collaborator

I agree that there's a bug here (which is kinda obvious since our behaviour/results vary across python versions).

However, I'm not sure that sending 'Hello-µ@ßöäüàá-UTF-8!!' should fail. The spec says that Unicode-escaping is valid, so that should not fail if we send that text Unicode-escaped (which I'd have to check the source to see if we're doing or not). Based on that, we can assert if the python2 version is misbehaving or the python3 version is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants