@@ -250,7 +250,7 @@ def test_spawn_fail_make_pipes_emfile(self):
250
250
251
251
def test_spawn_fail_make_pipes_other (self ):
252
252
options = DummyOptions ()
253
- options .make_pipes_error = 1
253
+ options .make_pipes_error = errno . EPERM
254
254
config = DummyPConfig (options , 'good' , '/good/filename' )
255
255
instance = self ._makeOne (config )
256
256
from supervisor .states import ProcessStates
@@ -327,7 +327,7 @@ def test_spawn_fork_fail_eagain(self):
327
327
328
328
def test_spawn_fork_fail_other (self ):
329
329
options = DummyOptions ()
330
- options .fork_error = 1
330
+ options .fork_error = errno . EPERM
331
331
config = DummyPConfig (options , 'good' , '/good/filename' )
332
332
instance = self ._makeOne (config )
333
333
from supervisor .states import ProcessStates
@@ -436,7 +436,7 @@ def test_spawn_as_child_sets_umask(self):
436
436
def test_spawn_as_child_cwd_fail (self ):
437
437
options = DummyOptions ()
438
438
options .forkpid = 0
439
- options .chdir_error = 2
439
+ options .chdir_error = errno . ENOENT
440
440
config = DummyPConfig (options , 'good' , '/good/filename' ,
441
441
directory = '/tmp' )
442
442
instance = self ._makeOne (config )
@@ -458,7 +458,7 @@ def test_spawn_as_child_cwd_fail(self):
458
458
def test_spawn_as_child_execv_fail_oserror (self ):
459
459
options = DummyOptions ()
460
460
options .forkpid = 0
461
- options .execv_error = 1
461
+ options .execv_error = errno . EPERM
462
462
config = DummyPConfig (options , 'good' , '/good/filename' )
463
463
instance = self ._makeOne (config )
464
464
result = instance .spawn ()
@@ -477,7 +477,7 @@ def test_spawn_as_child_execv_fail_oserror(self):
477
477
def test_spawn_as_child_execv_fail_runtime_error (self ):
478
478
options = DummyOptions ()
479
479
options .forkpid = 0
480
- options .execv_error = 2
480
+ options .execv_error = errno . ENOENT
481
481
config = DummyPConfig (options , 'good' , '/good/filename' )
482
482
instance = self ._makeOne (config )
483
483
result = instance .spawn ()
@@ -815,7 +815,7 @@ def test_kill_nopid(self):
815
815
def test_kill_error (self ):
816
816
options = DummyOptions ()
817
817
config = DummyPConfig (options , 'test' , '/test' )
818
- options .kill_error = 1
818
+ options .kill_error = errno . EPERM
819
819
instance = self ._makeOne (config )
820
820
L = []
821
821
from supervisor .states import ProcessStates
@@ -1000,7 +1000,7 @@ def kill(pid, sig):
1000
1000
def test_signal_error (self ):
1001
1001
options = DummyOptions ()
1002
1002
config = DummyPConfig (options , 'test' , '/test' )
1003
- options .kill_error = 1
1003
+ options .kill_error = errno . EPERM
1004
1004
instance = self ._makeOne (config )
1005
1005
L = []
1006
1006
from supervisor .states import ProcessStates
0 commit comments