Skip to content

Commit

Permalink
fix module reloading test
Browse files Browse the repository at this point in the history
  • Loading branch information
rutsky committed Feb 3, 2016
1 parent fbb102b commit f3e5352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions master/buildbot/test/unit/test_worker_transition.py
Expand Up @@ -113,15 +113,16 @@ def test_module_reload(self):
{'buildbot_module': buildbot_module}):
scope = buildbot_module.__dict__
deprecatedWorkerModuleAttribute(scope, Worker)

# Overwrite with Twisted's module wrapper.
import buildbot_module

# Module reload is effectively re-run of module contents.

Worker = type("Worker", (object,), {})
buildbot_module.Worker = Worker
scope = buildbot_module.__dict__
deprecatedWorkerModuleAttribute(scope, Worker)
# Overwrite with Twisted's module wrapper.
import buildbot_module

with assertNotProducesWarnings(DeprecatedWorkerAPIWarning):
W = buildbot_module.Worker
Expand Down

0 comments on commit f3e5352

Please sign in to comment.