canonical / mir-ci

Mir CI helpers
1 stars 1 forks source link

test: add the `deps` fixture #17

Closed Saviq closed 1 year ago

Saviq commented 1 year ago

bors try

bors[bot] commented 1 year ago

try

Build succeeded:

Saviq commented 1 year ago

@wmww so to run with only one server, you'd just go:

@pytest.mark.parameterize('server',
  (apps.snap('confined-shell', channel='edge'),)
)
@pytest.mark.parameterize('app',
  (apps.gedit(),)
)
def test_one_server(server, app):
  assert server == ('confined-shell',)
  assert app == ('gedit', '-s')

Or even simpler:

@pytest.mark.deps(snap='confined-shell', channel='edge')
@pytest.mark.parametrize('app',
  (apps.gedit(),)
)
def test_one_server(app):
  # assert server == ('confined-shell',)  # you don't get that, then
  assert app == ('gedit', '-s')
bors[bot] commented 1 year ago

Build succeeded: