Commit cf9dc8dc authored by Flavio TARSETTI's avatar Flavio TARSETTI

Merge branch 'update_tests' into 'master'

Fix test warnings

See merge request !151
parents 3e8d67ff 1f7f2207
Pipeline #50657 passed with stages
in 24 minutes and 53 seconds
......@@ -42,12 +42,12 @@ from ..widgets.databaseeditor import ViewEditor
from ..widgets.databaseeditor import ViewsEditor
@pytest.yield_fixture(params=[i for i in range(1, 3)])
@pytest.fixture(params=[i for i in range(1, 3)])
def test_database(request):
yield "simple/{}".format(request.param)
@pytest.yield_fixture(
@pytest.fixture(
params=[
{},
{"test_string": "test string", "test_number": 12.0, "test_boolean": True},
......
......@@ -40,7 +40,7 @@ from ..backend.asset import AssetType
def test_Qt_version_equal():
assert utils.is_Qt_equal_or_higher(QtCore.QT_VERSION_STR)
assert utils.is_Qt_equal_or_higher(QtCore.qVersion())
def test_Qt_version_higher():
......
......@@ -121,7 +121,7 @@ def dataformat_basetypes():
def is_Qt_equal_or_higher(version_string):
return version.parse(QtCore.QT_VERSION_STR) >= version.parse(version_string)
return version.parse(QtCore.qVersion()) >= version.parse(version_string)
def check_prefix_folders(prefix_path):
......
......@@ -231,7 +231,7 @@ class InputPin(BasePin):
* self.block_object.pin_height
)
rect = QRectF(QRect(x, y, width, height))
rect = QRectF(x, y, width, height)
return rect
......@@ -267,7 +267,7 @@ class OutputPin(BasePin):
* self.block_object.pin_height
)
rect = QRectF(QRect(x, y, width, height))
rect = QRectF(x, y, width, height)
return rect
......@@ -1050,8 +1050,7 @@ class Block(QGraphicsObject):
self.custom_height = (
text_height + self.height + max_pin_height * self.pin_height
)
rect = QRect(0, -text_height, self.custom_width, self.custom_height)
rect = QRectF(rect)
rect = QRectF(0, -text_height, self.custom_width, self.custom_height)
return rect
def draw_pins_name(self, painter, _type, data, offset):
......@@ -1367,7 +1366,7 @@ class ToolchainView(QGraphicsView):
min_y = min(y_list) + block.boundingRect().y()
max_width = max(x_list) + max(width_list) - min_x
max_height = max(y_list) + max(height_list) - min_y
rect = QRectF(QRect(min_x, min_y, max_width, max_height))
rect = QRectF(min_x, min_y, max_width, max_height)
toolchain_focus = rect
else:
toolchain_focus = self.scene().itemsBoundingRect()
......
......@@ -46,6 +46,9 @@ test:
imports:
- {{ name }}
script_env:
- QT_QPA_PLATFORM=offscreen
commands:
- beat editor --help
- beat editor start --help
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment