Skip to content

Commit

Permalink
hoist skip
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Feb 14, 2023
1 parent 1560681 commit da98def
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/twisted/conch/test/test_unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,18 @@ def spawnProcess(
)


shouldSkip = (
"Cannot run without cryptography"
if cryptography is None
else "Unix system required"
if unix is None
else None
)


class TestSSHSessionForUnixConchUser(unittest.TestCase):

if cryptography is None:
skip = "Cannot run without cryptography"
elif unix is None:
skip = "Unix system required"
skip = shouldSkip

def testExecCommandEnvironment(self) -> None:
"""
Expand Down Expand Up @@ -94,6 +100,8 @@ class TestUnixSSHRealm(unittest.TestCase):
Tests for L{UnixSSHRealm}.
"""

skip = shouldSkip

def test_unixSSHRealm(self) -> None:
"""
L{UnixSSHRealm} is an L{IRealm} whose C{.requestAvatar} method returns
Expand Down

0 comments on commit da98def

Please sign in to comment.