-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5319e04
commit edfc529
Showing
5 changed files
with
59 additions
and
12 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from brainglobe_utils.qtpy.logo import header_widget | ||
|
||
|
||
def test_logo(qtbot): | ||
package_name = "test" | ||
package_tagline = "Tagline" | ||
package_tutorial = "test.html" | ||
|
||
header = header_widget(package_name, package_tagline, package_tutorial) | ||
|
||
qtbot.addWidget(header) | ||
|
||
# header.window().show() | ||
|
||
expected_strings_logo = [package_name, "brainglobe.png"] | ||
expected_strings_docs = [ | ||
package_tagline, | ||
package_tutorial, | ||
"https://brainglobe.info", | ||
"https://github.com", | ||
] | ||
|
||
assert header.layout().count() == 2 | ||
|
||
for logo_string in expected_strings_logo: | ||
assert logo_string in header.layout().itemAt(0).widget().text() | ||
|
||
for docs_string in expected_strings_docs: | ||
assert docs_string in header.layout().itemAt(1).widget().text() |