Skip to content

Commit

Permalink
Add periods and newlines to make ruff happy
Browse files Browse the repository at this point in the history
  • Loading branch information
james-garner-canonical committed Sep 17, 2024
1 parent 2e9b3bf commit 12310eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/test_snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ def test_fake_socket(self):

@patch("builtins.hasattr", return_value=False)
def test_not_implemented_raised_when_missing_socket_af_unix(self, _: MagicMock):
"""Assert NotImplementedError raised when missing socket.AF_UNIX"""
"""Assert NotImplementedError raised when missing socket.AF_UNIX."""
s = snap._UnixSocketConnection("localhost")
with self.assertRaises(NotImplementedError):
s.connect() # hasattr(socket, "AF_UNIX") == False
Expand Down Expand Up @@ -852,8 +852,9 @@ def test_snap_get(self):
An invalid key will raise an error if typed=False, but return None if typed=True.
"""

def fake_snap(command: str, optargs: Optional[Iterable[str]] = None) -> str:
"""Snap._snap would normally call subprocess.check_output(["snap", ...], ...)
"""Snap._snap would normally call subprocess.check_output(["snap", ...], ...).
Here we only handle the "get" commands generated by Snap.get:
["snap", "get", "-d"] -- equivalent to (None, typed=True)
Expand Down

0 comments on commit 12310eb

Please sign in to comment.