Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
5cf608fb
Commit
5cf608fb
authored
5 years ago
by
Phil
Browse files
Options
Downloads
Patches
Plain Diff
Re #26596 font tests
parent
f4403743
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qt/python/mantidqt/project/test/test_plotssaver.py
+11
-0
11 additions, 0 deletions
qt/python/mantidqt/project/test/test_plotssaver.py
qt/python/mantidqt/widgets/plotconfigdialog/test/test_apply_all_properties.py
+5
-0
5 additions, 0 deletions
...idgets/plotconfigdialog/test/test_apply_all_properties.py
with
16 additions
and
0 deletions
qt/python/mantidqt/project/test/test_plotssaver.py
+
11
−
0
View file @
5cf608fb
...
...
@@ -9,6 +9,7 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
,
unicode_literals
)
import
matplotlib
import
platform
import
unittest
from
mantid.api
import
AnalysisDataService
as
ADS
...
...
@@ -127,6 +128,11 @@ class PlotsSaverTest(unittest.TestCase):
self
.
loader_plot_dict
[
u
'
creationArguments
'
]
=
[[{
u
"
specNum
"
:
2
,
"
function
"
:
"
plot
"
}]]
# The original font isn't available on Windows so it has to be changed.
if
platform
.
system
()
==
"
Windows
"
:
self
.
loader_plot_dict
[
u
'
axes
'
][
0
][
u
'
legend
'
][
u
'
entries_font
'
]
=
'
DejaVu Sans
'
self
.
loader_plot_dict
[
u
'
axes
'
][
0
][
u
'
legend
'
][
u
'
title_font
'
]
=
'
DejaVu Sans
'
self
.
maxDiff
=
None
self
.
assertDictEqual
(
return_value
,
self
.
loader_plot_dict
)
...
...
@@ -136,6 +142,11 @@ class PlotsSaverTest(unittest.TestCase):
expected_value
=
self
.
loader_plot_dict
[
"
axes
"
][
0
]
# The original font isn't available on Windows so it has to be changed.
if
platform
.
system
()
==
"
Windows
"
:
self
.
loader_plot_dict
[
u
'
axes
'
][
0
][
u
'
legend
'
][
u
'
entries_font
'
]
=
'
DejaVu Sans
'
self
.
loader_plot_dict
[
u
'
axes
'
][
0
][
u
'
legend
'
][
u
'
title_font
'
]
=
'
DejaVu Sans
'
self
.
maxDiff
=
None
self
.
assertDictEqual
(
return_value
,
expected_value
)
...
...
This diff is collapsed.
Click to expand it.
qt/python/mantidqt/widgets/plotconfigdialog/test/test_apply_all_properties.py
+
5
−
0
View file @
5cf608fb
...
...
@@ -6,6 +6,7 @@
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
import
platform
import
unittest
import
matplotlib
...
...
@@ -308,6 +309,8 @@ class ApplyAllPropertiesTest(unittest.TestCase):
self
.
new_legend
.
get_frame
().
get_alpha
())
def
test_apply_properties_on_figure_with_legend_sets_entries_font
(
self
):
if
platform
.
system
()
==
"
Windows
"
:
new_legend_props
[
'
entries_font
'
]
=
'
DejaVu Sans
'
self
.
assertEqual
(
new_legend_props
[
'
entries_font
'
],
self
.
new_legend
.
get_texts
()[
0
].
get_fontname
())
...
...
@@ -320,6 +323,8 @@ class ApplyAllPropertiesTest(unittest.TestCase):
self
.
new_legend
.
get_texts
()[
0
].
get_color
())
def
test_apply_properties_on_figure_with_legend_sets_title_font
(
self
):
if
platform
.
system
()
==
"
Windows
"
:
new_legend_props
[
'
title_font
'
]
=
'
DejaVu Sans
'
self
.
assertEqual
(
new_legend_props
[
'
title_font
'
],
self
.
new_legend
.
get_title
().
get_fontname
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment