Skip to content

Commit fb2cfba

Browse files
Bastian-KrauseEmantor
authored andcommitted
examples: run ruff format
Signed-off-by: Bastian Krause <[email protected]>
1 parent 55c2c3a commit fb2cfba

36 files changed

+153
-153
lines changed

examples/barebox/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import pytest
22

33

4-
@pytest.fixture(scope='session')
4+
@pytest.fixture(scope="session")
55
def command(target):
6-
barebox = target.get_driver('CommandProtocol')
6+
barebox = target.get_driver("CommandProtocol")
77
target.activate(barebox)
88
return barebox

examples/barebox/test_barebox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
def test_barebox(command):
2-
stdout, stderr, returncode = command.run('version')
2+
stdout, stderr, returncode = command.run("version")
33
assert returncode == 0
44
assert stdout
55
assert not stderr
6-
assert 'barebox' in '\n'.join(stdout)
6+
assert "barebox" in "\n".join(stdout)
77

8-
stdout, stderr, returncode = command.run('false')
8+
stdout, stderr, returncode = command.run("false")
99
assert returncode == 1
1010
assert not stdout
1111
assert not stderr

examples/barebox/test_bootchooser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33

44
def test_bootchooser(command):
5-
stdout, stderr, returncode = command.run('bootchooser -i')
5+
stdout, stderr, returncode = command.run("bootchooser -i")
66
if returncode == 127:
77
pytest.skip("bootchooser command not available")
88
assert returncode == 0
99
assert not stderr
10-
assert stdout[0].startswith('Good targets')
11-
assert stdout[1] != 'none'
10+
assert stdout[0].startswith("Good targets")
11+
assert stdout[1] != "none"

examples/barebox/test_sleep.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
def test_sleep(command):
77
# measure the round-trip-time
88
timestamp = monotonic()
9-
stdout, stderr, returncode = command.run('true')
9+
stdout, stderr, returncode = command.run("true")
1010
elapsed_true = monotonic() - timestamp
1111
assert returncode == 0
1212
assert not stdout
1313
assert not stderr
1414

1515
timestamp = monotonic()
16-
stdout, stderr, returncode = command.run('sleep 1')
16+
stdout, stderr, returncode = command.run("sleep 1")
1717
elapsed_sleep = monotonic() - timestamp
1818
assert returncode == 0
1919
assert not stdout

examples/barebox/test_state.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33

44
def test_state(command):
5-
stdout, stderr, returncode = command.run('state')
5+
stdout, stderr, returncode = command.run("state")
66
if returncode == 127:
77
pytest.skip("state command not available")
88
assert returncode == 0
99
assert not stderr
10-
assert stdout[0] == 'registered state instances:'
10+
assert stdout[0] == "registered state instances:"
1111
assert len(stdout) > 1

examples/barebox/test_watchdog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
def test_watchdog(command):
5-
stdout, stderr, returncode = command.run('wd 1')
5+
stdout, stderr, returncode = command.run("wd 1")
66
if returncode == 127:
77
pytest.skip("wd command not available")
88
assert returncode == 0
@@ -11,6 +11,6 @@ def test_watchdog(command):
1111

1212
command._await_prompt()
1313

14-
stdout = command.run_check('echo ${global.system.reset}')
14+
stdout = command.run_check("echo ${global.system.reset}")
1515
assert len(stdout) == 1
16-
assert stdout[0] == 'WDG'
16+
assert stdout[0] == "WDG"

examples/deditec-relais8/deditec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# log labgrid steps
1313
StepLogger.start()
1414

15-
t = Target('main')
15+
t = Target("main")
1616
r = DeditecRelais8(t, name=None, index=1)
1717
d = DeditecRelaisDriver(t, name=None)
1818

examples/deditec-relais8/deditec_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# show labgrid steps on the console
1111
StepLogger.start()
1212

13-
e = Environment('import-dedicontrol.yaml')
13+
e = Environment("import-dedicontrol.yaml")
1414
t = e.get_target()
1515

1616
p = t.get_driver("DigitalOutputProtocol")

examples/docker/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import pytest
22

3-
@pytest.fixture(scope='session')
3+
4+
@pytest.fixture(scope="session")
45
def command(target):
5-
strategy = target.get_driver('DockerStrategy')
6+
strategy = target.get_driver("DockerStrategy")
67
strategy.transition("accessible")
7-
shell = target.get_driver('CommandProtocol')
8+
shell = target.get_driver("CommandProtocol")
89
return shell
9-

examples/docker/test_shell.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
def test_shell(command):
2-
stdout, stderr, returncode = command.run('cat /proc/version')
2+
stdout, stderr, returncode = command.run("cat /proc/version")
33
assert returncode == 0
44
assert len(stdout) > 0
55
assert len(stderr) == 0
6-
assert 'Linux' in stdout[0]
6+
assert "Linux" in stdout[0]
77

8-
stdout, stderr, returncode = command.run('false')
8+
stdout, stderr, returncode = command.run("false")
99
assert returncode != 0
1010
assert len(stdout) == 0
1111
assert len(stderr) == 0

0 commit comments

Comments
 (0)