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

Disallow multiple network.block() calls #43

Open
Stranger6667 opened this issue May 12, 2020 · 0 comments
Open

Disallow multiple network.block() calls #43

Stranger6667 opened this issue May 12, 2020 · 0 comments

Comments

@Stranger6667
Copy link
Collaborator

Stranger6667 commented May 12, 2020

If the --block-network CMD option is passed, and if network.block is called in code, then one will overwrite another, and it depends on the execution order, which may lead to hard-to-track bugs in tests (it happened in one of our projects)

Implementation notes:

  • In the network.block call check if socket.socket.connect is already replaced
  • If so, raise a RuntimeError with some explanation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant