-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1523 from Bastian-Krause/bst/ruff
ruff: maintain configuration, format examples and labgrid.protocols
- Loading branch information
Showing
40 changed files
with
169 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope='session') | ||
@pytest.fixture(scope="session") | ||
def command(target): | ||
barebox = target.get_driver('CommandProtocol') | ||
barebox = target.get_driver("CommandProtocol") | ||
target.activate(barebox) | ||
return barebox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
def test_barebox(command): | ||
stdout, stderr, returncode = command.run('version') | ||
stdout, stderr, returncode = command.run("version") | ||
assert returncode == 0 | ||
assert stdout | ||
assert not stderr | ||
assert 'barebox' in '\n'.join(stdout) | ||
assert "barebox" in "\n".join(stdout) | ||
|
||
stdout, stderr, returncode = command.run('false') | ||
stdout, stderr, returncode = command.run("false") | ||
assert returncode == 1 | ||
assert not stdout | ||
assert not stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import pytest | ||
|
||
@pytest.fixture(scope='session') | ||
|
||
@pytest.fixture(scope="session") | ||
def command(target): | ||
strategy = target.get_driver('DockerStrategy') | ||
strategy = target.get_driver("DockerStrategy") | ||
strategy.transition("accessible") | ||
shell = target.get_driver('CommandProtocol') | ||
shell = target.get_driver("CommandProtocol") | ||
return shell | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
def test_shell(command): | ||
stdout, stderr, returncode = command.run('cat /proc/version') | ||
stdout, stderr, returncode = command.run("cat /proc/version") | ||
assert returncode == 0 | ||
assert len(stdout) > 0 | ||
assert len(stderr) == 0 | ||
assert 'Linux' in stdout[0] | ||
assert "Linux" in stdout[0] | ||
|
||
stdout, stderr, returncode = command.run('false') | ||
stdout, stderr, returncode = command.run("false") | ||
assert returncode != 0 | ||
assert len(stdout) == 0 | ||
assert len(stderr) == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope='session') | ||
@pytest.fixture(scope="session") | ||
def instrument(target): | ||
_modbus = target.get_driver('ModbusRTUDriver') | ||
_modbus = target.get_driver("ModbusRTUDriver") | ||
return _modbus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
def test_target(target): | ||
barebox = target.get_driver('CommandProtocol') | ||
barebox = target.get_driver("CommandProtocol") | ||
target.activate(barebox) | ||
|
||
stdout, stderr, returncode = barebox.run('version') | ||
stdout, stderr, returncode = barebox.run("version") | ||
assert returncode == 0 | ||
assert stdout | ||
assert not stderr | ||
assert 'barebox' in '\n'.join(stdout) | ||
assert "barebox" in "\n".join(stdout) | ||
|
||
stdout, stderr, returncode = barebox.run('false') | ||
stdout, stderr, returncode = barebox.run("false") | ||
assert returncode == 1 | ||
assert not stdout | ||
assert not stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope='session') | ||
@pytest.fixture(scope="session") | ||
def command(target): | ||
shell = target.get_driver('CommandProtocol') | ||
shell = target.get_driver("CommandProtocol") | ||
target.activate(shell) | ||
return shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.