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

test commit please ignore #1263

Closed
wants to merge 1 commit into from
Closed

test commit please ignore #1263

wants to merge 1 commit into from

Conversation

asottile
Copy link
Contributor

ignore me, just trying to trigger some py27 CI w/ instrumentation since I can't seem to repro this locally

@asottile
Copy link
Contributor Author

CC @gaborbernat

going to keep my notes here on this

After adjusting pytest to error, here's the trace:

(I clobbered the stacktrace, but it's while pytest is inspecting local variables):

INTERNALERROR>     localsrepr = self.repr_locals(entry.locals)
INTERNALERROR>   File "d:\a\1\s\.tox\py27\lib\site-packages\_pytest\_code\code.py", line 682, in repr_locals
INTERNALERROR>     raise ValueError("{} {} {}".format(name, type(value), e))
INTERNALERROR> ValueError: result <type 'instance'> 'ascii' codec can't encode character u'\u280b' in position 40: ordinal not in range(128)

In this particular case, it's an assertion while producing a repr of an old-style-class assigned to result. The only place of this in tox's testsuite is in tox's pytest plugin.

This implementation of repr is buggy, but also pytest shouldn't die here (so if my hunch is correct ~3 bugs: a flaky test, a bad repr, and pytest crash)

def __repr__(self):
return "RunResult(ret={}, args={}, out=\n{}\n, err=\n{})".format(
self.ret, " ".join(str(i) for i in self.args), self.out, self.err
)

@asottile asottile closed this Apr 15, 2019
@asottile asottile deleted the test_plz_ignore branch April 15, 2019 18:09
@asottile asottile restored the test_plz_ignore branch April 15, 2019 20:19
@asottile asottile reopened this Apr 15, 2019
@asottile
Copy link
Contributor Author

I'm now trying to narrow down the actual failure, it seems that xdist forces -v which tickles the bug -- trying to figure out how to turn that off :S

@gaborbernat
Copy link
Member

Let's fix the buggy repr 😄

@asottile
Copy link
Contributor Author

I can take that 👍

@gaborbernat
Copy link
Member

I think I already addressed it on #1261 just running it

@asottile
Copy link
Contributor Author

this is the pytest bug btw: pytest-dev/pytest#5089

we fixed the repr in #1264 and the flaky test will be fixed in #1261

good work team, these are my favorite types of bugs to debug and fix and this is why I love working on open source and software

@asottile asottile closed this Apr 16, 2019
@asottile asottile deleted the test_plz_ignore branch April 16, 2019 15:28
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

Successfully merging this pull request may close these issues.

None yet

2 participants