[formatting] reformat using "black -t py34"
getting rid of thinking about consistent formatting...
This commit is contained in:
parent
fa98bcbdd1
commit
30c1f712a6
119 changed files with 3961 additions and 3495 deletions
|
@ -2,13 +2,14 @@ import unittest
|
|||
|
||||
import util.cli
|
||||
|
||||
|
||||
class cli(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.nonExistentCommand = 'i-do-not-exist'
|
||||
self.validCommand = 'echo test'
|
||||
self.validCommandOutput = 'test\n'
|
||||
self.utfCommand = 'echo ÖPmŧß'
|
||||
self.utfCommandOutput = 'ÖPmŧß\n'
|
||||
self.nonExistentCommand = "i-do-not-exist"
|
||||
self.validCommand = "echo test"
|
||||
self.validCommandOutput = "test\n"
|
||||
self.utfCommand = "echo ÖPmŧß"
|
||||
self.utfCommandOutput = "ÖPmŧß\n"
|
||||
|
||||
def test_valid_command(self):
|
||||
rv = util.cli.execute(self.validCommand)
|
||||
|
@ -24,16 +25,19 @@ class cli(unittest.TestCase):
|
|||
|
||||
def test_command_exit_code(self):
|
||||
with self.assertRaises(RuntimeError):
|
||||
util.cli.execute('cat {}'.format(self.nonExistentCommand))
|
||||
util.cli.execute("cat {}".format(self.nonExistentCommand))
|
||||
|
||||
def test_command_exit_code_no_error(self):
|
||||
try:
|
||||
util.cli.execute('cat {}'.format(self.nonExistentCommand), ignore_errors=True)
|
||||
util.cli.execute(
|
||||
"cat {}".format(self.nonExistentCommand), ignore_errors=True
|
||||
)
|
||||
except Exception:
|
||||
self.fail('exception was thrown')
|
||||
self.fail("exception was thrown")
|
||||
|
||||
def test_async(self):
|
||||
rv = util.cli.execute(self.validCommand, wait=False)
|
||||
self.assertEqual('', rv)
|
||||
self.assertEqual("", rv)
|
||||
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue