Skip to content

fix(threads): fix the separate thread execution in 3.7, add tests#361

Merged
pavelfeldman merged 1 commit intomicrosoft:masterfrom
pavelfeldman:m37threads
Dec 10, 2020
Merged

fix(threads): fix the separate thread execution in 3.7, add tests#361
pavelfeldman merged 1 commit intomicrosoft:masterfrom
pavelfeldman:m37threads

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

No description provided.

class TestThread(threading.Thread):
def run(self):
with sync_playwright() as playwright:
browser = playwright.__dict__[browser_name].launch()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: getattr would be better since "dunder methods" should not be used. But since its only a test I'm fine with it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dead code, it should have been deleted.

import os

import pytest
import threading
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import threading

@pavelfeldman pavelfeldman force-pushed the m37threads branch 2 times, most recently from ebfd78d to 501414b Compare December 10, 2020 20:33
@pavelfeldman pavelfeldman merged commit e9f2205 into microsoft:master Dec 10, 2020
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.

2 participants