Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#11686 Fix test_openFileDescriptors in some environments. #11687

Merged
merged 1 commit into from Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.