Vladimir Druzhinin e768492703 Fix/143 image comparison (#150)
* Attach squish server config to test report

* Fix image comparison on CI 

#143

* Fix failed image comparison

#143

* List branches added

#144
2023-10-09 11:38:48 +02:00

23 lines
534 B
Python

import allure
import pytest
from driver.server import SquishServer
@pytest.fixture(scope='session')
def start_squish_server():
squish_server = SquishServer()
squish_server.stop()
attempt = 3
while True:
try:
squish_server.start()
break
except AssertionError as err:
attempt -= 1
if not attempt:
pytest.exit(err)
yield squish_server
squish_server.stop()
allure.attach.file('Squish server config', str(squish_server.config))