Skip to content

Commit 34f35f6

Browse files
committed
tests: Format test_alias.py
Formatting test_alias.py is trivial. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent e49573e commit 34f35f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_alias.py

+9
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010

1111
assert 'TOXTEMPDIR' in os.environ, "you must run these tests using tox"
1212

13+
1314
@pytest.fixture(autouse=True)
1415
def autouse_tmpdir(config_tmpdir, west_init_tmpdir):
1516
# Since this module tests west's configuration file features,
1617
# adding autouse=True to the config_tmpdir and west_init_tmpdir fixtures
1718
# saves typing and is less error-prone than using it below in every test case.
1819
pass
1920

21+
2022
def test_alias_commands():
2123
cmd('config alias.test1 topdir')
2224
cmd('config --global alias.test2 topdir')
@@ -28,6 +30,7 @@ def test_alias_commands():
2830
assert cmd('test2') == topdir_out
2931
assert cmd('test3') == topdir_out
3032

33+
3134
def test_alias_help():
3235
cmd('config alias.test topdir')
3336

@@ -36,13 +39,15 @@ def test_alias_help():
3639
assert "An alias that expands to: topdir" in help_out
3740
assert cmd('-h test') == help_out
3841

42+
3943
def test_alias_recursive_commands():
4044
list_format = '{revision} TESTALIAS {name}'
4145
cmd(['config', 'alias.test1', f'list -f "{list_format}"'])
4246
cmd('config alias.test2 test1')
4347

4448
assert cmd('test2') == cmd(['list', '-f', list_format])
4549

50+
4651
def test_alias_infinite_recursion():
4752
cmd('config alias.test1 test2')
4853
cmd('config alias.test2 test3')
@@ -53,6 +58,7 @@ def test_alias_infinite_recursion():
5358

5459
assert 'unknown command "test1";' in str(excinfo.value.stdout)
5560

61+
5662
def test_alias_empty():
5763
cmd(['config', 'alias.empty', ''])
5864

@@ -64,18 +70,21 @@ def test_alias_empty():
6470

6571
assert 'empty alias "empty"' in str(excinfo.value.stdout)
6672

73+
6774
def test_alias_early_args():
6875
cmd('config alias.test1 topdir')
6976

7077
# An alias with an early command argument shouldn't fail
7178
assert "Replacing alias test1 with ['topdir']" in cmd('-v test1')
7279

80+
7381
def test_alias_command_with_arguments():
7482
list_format = '{revision} TESTALIAS {name}'
7583
cmd(['config', 'alias.revs', f'list -f "{list_format}"'])
7684

7785
assert cmd('revs') == cmd(['list', '-f', list_format])
7886

87+
7988
def test_alias_override():
8089
before = cmd('list')
8190
list_format = '{name} : {revision}'

0 commit comments

Comments
 (0)