Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix pylint
  • Loading branch information
rutsky committed Feb 3, 2016
1 parent 62f0e7f commit fbb102b
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions master/buildbot/test/unit/test_worker_transition.py
Expand Up @@ -59,9 +59,7 @@ def test_dummy_rename(self):
class Test_deprecatedWorkerModuleAttribute(unittest.TestCase):

def test_produces_warning(self):
class Worker:
pass

Worker = type("Worker", (object,), {})
buildbot_module = new.module('buildbot_module')
buildbot_module.Worker = Worker
with mock.patch.dict(sys.modules,
Expand All @@ -84,8 +82,7 @@ class Worker:
self.assertIdentical(S, Worker)

def test_explicit_name(self):
Worker = type("Worker")

Worker = type("Worker", (object,), {})
buildbot_module = new.module('buildbot_module')
buildbot_module.Worker = Worker
with mock.patch.dict(sys.modules,
Expand All @@ -109,9 +106,7 @@ def test_explicit_name(self):
self.assertIdentical(S, Worker)

def test_module_reload(self):
class Worker:
pass

Worker = type("Worker", (object,), {})
buildbot_module = new.module('buildbot_module')
buildbot_module.Worker = Worker
with mock.patch.dict(sys.modules,
Expand All @@ -124,9 +119,7 @@ class Worker:

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

class Worker:
pass

Worker = type("Worker", (object,), {})
buildbot_module.Worker = Worker
deprecatedWorkerModuleAttribute(scope, Worker)

Expand Down

0 comments on commit fbb102b

Please sign in to comment.