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

Live logger error before 'when' is set #3184

Closed
uSpike opened this Issue Feb 1, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@uSpike
Member

uSpike commented Feb 1, 2018

Hi,

The live logger _LiveLoggingStreamHandler will emit messages in emit():

self.stream.section('live log ' + self._when, sep='-', bold=True)

If self._when is None, which may be the case before a test is actually started, this will raise an exception:

TypeError: cannot concatenate 'str' and 'NoneType' objects

I ran into this issue with a plugin I created which emits log messages before the first test starts. It's a pretty simple fix which I'm fine creating a PR for, but what should the text be if self._when is None?

@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Feb 1, 2018

Hi @uSpike, thanks for the report. I believe #3175, already fixes this though, can you give that branch a try?

@uSpike

This comment has been minimized.

Member

uSpike commented Feb 1, 2018

@nicoddemus it does seem that #3175 fixes the issue, thanks for linking me to that.

@uSpike uSpike closed this Feb 1, 2018

@nicoddemus nicoddemus referenced this issue Feb 1, 2018

Closed

Fixes to live logs #3175

3 of 4 tasks complete
@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Feb 1, 2018

Thanks, but lets keep this open because we don't have an issue to track this bug anyway. 👍

@nicoddemus nicoddemus reopened this Feb 1, 2018

@s0undt3ch

This comment has been minimized.

Contributor

s0undt3ch commented Feb 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment