Skip to content

Commit

Permalink
black reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
jos3p committed Oct 9, 2019
1 parent 92bc58a commit 0741a71
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/test_connector_shell.py
Expand Up @@ -74,8 +74,10 @@ async def test_read_stdin(self):
await self.connector.read_stdin()
self.assertTrue(mocked_read_stdin.called)

if os.name == 'nt':
with amock.patch("asyncio.events.AbstractEventLoop.connect_read_pipe") as mock:
if os.name == "nt":
with amock.patch(
"asyncio.events.AbstractEventLoop.connect_read_pipe"
) as mock:
with contextlib.suppress(NotImplementedError):
await self.connector.read_stdin()
else:
Expand All @@ -84,15 +86,12 @@ async def test_read_stdin(self):
with contextlib.suppress(ValueError):
await self.connector.read_stdin()




async def test_connect(self):
connector = ConnectorShell({}, opsdroid=OpsDroid())
await connector.connect()
self.assertTrue(connector.connect)

with amock.patch('platform.system', amock.MagicMock(return_value="Windows")):
with amock.patch("platform.system", amock.MagicMock(return_value="Windows")):
await connector.connect()
self.assertTrue(connector.connect)

Expand Down

0 comments on commit 0741a71

Please sign in to comment.