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

Live logger error before 'when' is set #3184

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

Live logger error before 'when' is set #3184

uSpike opened this issue Feb 1, 2018 · 4 comments
Labels

Comments

@uSpike
Copy link
Member

@uSpike 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
Copy link
Member

@nicoddemus 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
Copy link
Member Author

@uSpike 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 mentioned this issue Feb 1, 2018
3 of 4 tasks complete
@nicoddemus
Copy link
Member

@nicoddemus 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
Copy link
Contributor

@s0undt3ch s0undt3ch commented Feb 5, 2018

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

Successfully merging a pull request may close this issue.

None yet
4 participants