Skip to content

Commit

Permalink
#11686 Fix test_openFileDescriptors in some environments. (#11687)
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Sep 24, 2022
2 parents 58bd374 + 746b121 commit 47f4763
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/twisted/internet/test/test_process.py
Expand Up @@ -19,7 +19,6 @@

import hamcrest

import twisted
from twisted.internet import utils
from twisted.internet.defer import Deferred, inlineCallbacks, succeed
from twisted.internet.error import ProcessDone, ProcessTerminated
Expand All @@ -34,7 +33,6 @@

# Get the current Python executable as a bytestring.
pyExe = FilePath(sys.executable)._asBytesPath()
twistedRoot = FilePath(twisted.__file__).parent().parent()

_uidgidSkip = False
_uidgidSkipReason = ""
Expand Down Expand Up @@ -404,12 +402,9 @@ def test_openFileDescriptors(self):
source = networkString(
"""
import sys
sys.path.insert(0, '{}')
from twisted.internet import process
sys.stdout.write(repr(process._listOpenFDs()))
sys.stdout.flush()""".format(
twistedRoot.path
)
sys.stdout.flush()"""
)

r, w = os.pipe()
Expand Down Expand Up @@ -456,6 +451,7 @@ def processEnded(self, reason):
GatheringProtocol(),
pyExe,
[pyExe, b"-Wignore", b"-c", source],
env=properEnv,
usePTY=self.usePTY,
)

Expand Down
Empty file.

0 comments on commit 47f4763

Please sign in to comment.