Correct testbed tests of app icons.
This commit is contained in:
parent
790e03e2f3
commit
2b8a02f3f9
3 changed files with 3 additions and 9 deletions
|
|
@ -91,6 +91,7 @@ class AppProbe(BaseProbe):
|
||||||
assert mid_color in {
|
assert mid_color in {
|
||||||
(130, 100, 57, 255),
|
(130, 100, 57, 255),
|
||||||
(130, 109, 66, 255),
|
(130, 109, 66, 255),
|
||||||
|
(138, 107, 64, 255),
|
||||||
(138, 108, 64, 255),
|
(138, 108, 64, 255),
|
||||||
(149, 119, 73, 255),
|
(149, 119, 73, 255),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -600,6 +600,6 @@ async def test_app_icon(app, app_probe):
|
||||||
app_probe.assert_app_icon("resources/alt-icon")
|
app_probe.assert_app_icon("resources/alt-icon")
|
||||||
|
|
||||||
# Reset the icon to the default
|
# Reset the icon to the default
|
||||||
app.icon = None
|
app.icon = toga.Icon.APP_ICON
|
||||||
await app_probe.redraw("Revert app icon to default")
|
await app_probe.redraw("Revert app icon to default")
|
||||||
app_probe.assert_app_icon(None)
|
app_probe.assert_app_icon(None)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
@ -27,14 +25,9 @@ async def test_icon(app):
|
||||||
probe.assert_icon_content(probe.alternate_resource)
|
probe.assert_icon_content(probe.alternate_resource)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(
|
|
||||||
Path(sys.executable).stem.startswith("python"),
|
|
||||||
reason="Can't test app icon in a dev mode test",
|
|
||||||
)
|
|
||||||
async def test_app_icon(app):
|
async def test_app_icon(app):
|
||||||
"""The app icon can be obtained."""
|
"""The app icon can be obtained."""
|
||||||
icon = toga.Icon(None)
|
probe = icon_probe(app, toga.Icon.APP_ICON)
|
||||||
probe = icon_probe(app, icon)
|
|
||||||
probe.assert_app_icon_content()
|
probe.assert_app_icon_content()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue