Pārlūkot izejas kodu

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

Chris McDonough 10 gadi atpakaļ
vecāks
revīzija
9f44c04d74
1 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  1. 2 4
      supervisor/tests/base.py

+ 2 - 4
supervisor/tests/base.py

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