Setting up channel_log during replay #66
zohassadar
started this conversation in
Ideas
Replies: 2 comments
-
hey @zohassadar 👋 interesting! -- are you basically testing the contents of the channel log too and thats why ya need it there? It's been far too long since I looked at this but I guess this must just have been an oversight. If you wanna put a quick pr together we can get that merged in! Regarding the close callbacks: probably unnecessary... what other things to close do you think would pop up? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yup, exactly. The channel_log is a great feature. I simplified the closing and put in a PR. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was using the channel_log feature to scrape banner output and found that when running in a test, the driver.channel.channel_log was set to None instead of the BytesIO object expected. This looks to be the result of the channel's open method never getting called.
I was able to get the behavior I was looking for by calling
cls.channel.open()
within the patched open method. The code shown in this commit. I added a list for close callbacks to allow for future callbacks to be added, but this might be an overcomplication. If this is a desirable feature to keep around, I can submit a pull request.Beta Was this translation helpful? Give feedback.
All reactions