Bring up to date with mainline CQ-editor ec81ad9
partial pull for tests/tes_app.py only
This commit is contained in:
@@ -114,7 +114,7 @@ def get_rgba(ais):
|
|||||||
alpha = ais.Transparency()
|
alpha = ais.Transparency()
|
||||||
color = get_occ_color(ais)
|
color = get_occ_color(ais)
|
||||||
|
|
||||||
return color.redF(),color.redF(),color.redF(),alpha
|
return color.redF(), color.greenF(), color.blueF(), alpha
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def main(qtbot,mocker):
|
def main(qtbot,mocker):
|
||||||
@@ -1017,15 +1017,14 @@ def test_render_colors(main_clean):
|
|||||||
CQ = obj_tree.CQ
|
CQ = obj_tree.CQ
|
||||||
|
|
||||||
# object 1 (defualt color)
|
# object 1 (defualt color)
|
||||||
r,g,b,a = get_rgba(CQ.child(0).ais)
|
assert not CQ.child(0).ais.HasColor()
|
||||||
assert( a == 0 )
|
|
||||||
assert( r != 1.0 )
|
|
||||||
|
|
||||||
# object 2
|
# object 2
|
||||||
r,g,b,a = get_rgba(CQ.child(1).ais)
|
r,g,b,a = get_rgba(CQ.child(1).ais)
|
||||||
assert( a == 0.5 )
|
assert( a == 0.5 )
|
||||||
assert( r == 1.0 )
|
assert( r == 1.0 )
|
||||||
|
assert( g == 0.0 )
|
||||||
|
|
||||||
# object 3
|
# object 3
|
||||||
r,g,b,a = get_rgba(CQ.child(2).ais)
|
r,g,b,a = get_rgba(CQ.child(2).ais)
|
||||||
assert( a == 0.5)
|
assert( a == 0.5)
|
||||||
@@ -1059,20 +1058,11 @@ def test_render_colors_console(main_clean):
|
|||||||
console = win.components['console']
|
console = win.components['console']
|
||||||
|
|
||||||
console.execute_command(code_color)
|
console.execute_command(code_color)
|
||||||
|
|
||||||
def get_rgba(ais):
|
|
||||||
|
|
||||||
alpha = ais.Transparency()
|
|
||||||
color = get_occ_color(ais)
|
|
||||||
|
|
||||||
return color.redF(),color.redF(),color.redF(),alpha
|
|
||||||
|
|
||||||
CQ = obj_tree.CQ
|
CQ = obj_tree.CQ
|
||||||
|
|
||||||
# object 1 (defualt color)
|
# object 1 (defualt color)
|
||||||
r,g,b,a = get_rgba(CQ.child(0).ais)
|
assert not CQ.child(0).ais.HasColor()
|
||||||
assert( a == 0 )
|
|
||||||
assert( r != 1.0 )
|
|
||||||
|
|
||||||
# object 2
|
# object 2
|
||||||
r,g,b,a = get_rgba(CQ.child(1).ais)
|
r,g,b,a = get_rgba(CQ.child(1).ais)
|
||||||
|
|||||||
Reference in New Issue
Block a user