浏览代码

we no longer need to support py24, so we can use class decorators

Chris McDonough 10 年之前
父节点
当前提交
9f44c04d74
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      supervisor/tests/base.py

+ 2 - 4
supervisor/tests/base.py

@@ -373,6 +373,7 @@ class DummySocketManager:
     def get_socket(self):
     def get_socket(self):
         return DummySocket(self._config.fd)
         return DummySocket(self._config.fd)
 
 
+@total_ordering
 class DummyProcess(object):
 class DummyProcess(object):
     # Initial state; overridden by instance variables
     # Initial state; overridden by instance variables
     pid = 0 # Subprocess pid; 0 when not running
     pid = 0 # Subprocess pid; 0 when not running
@@ -499,8 +500,6 @@ class DummyProcess(object):
     def __lt__(self, other):
     def __lt__(self, other):
         return self.config.priority < other.config.priority
         return self.config.priority < other.config.priority
 
 
-DummyProcess = total_ordering(DummyProcess)
-
 class DummyPConfig:
 class DummyPConfig:
     def __init__(self, options, name, command, directory=None, umask=None,
     def __init__(self, options, name, command, directory=None, umask=None,
                  priority=999, autostart=True,
                  priority=999, autostart=True,
@@ -968,6 +967,7 @@ class DummyFCGIGroupConfig(DummyPGroupConfig):
         DummyPGroupConfig.__init__(self, options, name, priority, pconfigs)
         DummyPGroupConfig.__init__(self, options, name, priority, pconfigs)
         self.socket_config = socket_config
         self.socket_config = socket_config
 
 
+@total_ordering
 class DummyProcessGroup(object):
 class DummyProcessGroup(object):
     def __init__(self, config):
     def __init__(self, config):
         self.config = config
         self.config = config
@@ -994,8 +994,6 @@ class DummyProcessGroup(object):
     def __eq__(self, other):
     def __eq__(self, other):
         return self.config.priority == other.config.priority
         return self.config.priority == other.config.priority
 
 
-DummyProcessGroup = total_ordering(DummyProcessGroup)
-
 class DummyFCGIProcessGroup(DummyProcessGroup):
 class DummyFCGIProcessGroup(DummyProcessGroup):
 
 
     def __init__(self, config):
     def __init__(self, config):