virt-manager/tests/uitests/conftest.py
Cole Robinson aa8572048b uitests: Add a fixture for passing in VMMDogtailApp
Reproducing what the custom unittest TestCase does. Convert
test_about as a demo

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 14:25:53 -04:00

18 lines
371 B
Python

# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
import pytest
@pytest.fixture
def app():
"""
Custom pytest fixture to a VMMDogtailApp instance to the testcase
"""
from .lib.app import VMMDogtailApp
testapp = VMMDogtailApp()
try:
yield testapp
finally:
testapp.stop()