Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soitool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
bachelor-paa-bittet
soitool
Commits
91be9d1d
Commit
91be9d1d
authored
4 years ago
by
Thomas Holene Løkkeborg
Browse files
Options
Downloads
Patches
Plain Diff
#125 la til debug output om skjerm i oppløsningstest
parent
85224386
No related branches found
No related tags found
1 merge request
!70
#125 løsning til oppløsningstrøbbel ved å bruke px ikke pt i font
Pipeline
#82919
failed
4 years ago
Stage: lint
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_resolution_smoke_test.py
+43
-1
43 additions, 1 deletion
test/test_resolution_smoke_test.py
with
43 additions
and
1 deletion
test/test_resolution_smoke_test.py
+
43
−
1
View file @
91be9d1d
...
@@ -13,6 +13,7 @@ from PySide2.QtWidgets import QApplication
...
@@ -13,6 +13,7 @@ from PySide2.QtWidgets import QApplication
from
PySide2
import
QtGui
from
PySide2
import
QtGui
from
PySide2.QtCore
import
QTimer
,
Qt
from
PySide2.QtCore
import
QTimer
,
Qt
from
PySide2.QtTest
import
QTest
from
PySide2.QtTest
import
QTest
from
PySide2.QtGui
import
QGuiApplication
from
soitool.soi
import
SOI
from
soitool.soi
import
SOI
from
soitool.modules.module_authentication_board
import
(
from
soitool.modules.module_authentication_board
import
(
AuthenticationBoardModule
,
AuthenticationBoardModule
,
...
@@ -26,6 +27,43 @@ else:
...
@@ -26,6 +27,43 @@ else:
app
=
QtGui
.
qApp
app
=
QtGui
.
qApp
def
screen_information
():
"""
Get string with information about the screen.
Returns
-------
str
String with screen information.
"""
screen_string
=
""
screen
=
QGuiApplication
.
primaryScreen
()
screen_string
+=
"
screen.size() ->
"
+
str
(
screen
.
size
())
+
"
\n
"
screen_string
+=
(
"
screen.physicalDotsPerInchX() ->
"
+
str
(
screen
.
physicalDotsPerInchX
())
+
"
\n
"
)
screen_string
+=
(
"
screen.physicalDotsPerInchY() ->
"
+
str
(
screen
.
physicalDotsPerInchY
())
+
"
\n
"
)
screen_string
+=
(
"
screen.logicalDotsPerInchX() ->
"
+
str
(
screen
.
logicalDotsPerInchX
())
+
"
\n
"
)
screen_string
+=
(
"
screen.logicalDotsPerInchY() ->
"
+
str
(
screen
.
logicalDotsPerInchY
())
+
"
\n
"
)
screen_string
+=
(
"
screen.devicePixelRatio() ->
"
+
str
(
screen
.
devicePixelRatio
())
+
"
\n
"
)
return
screen_string
class
TestModulesAcrossResolutions
(
unittest
.
TestCase
):
class
TestModulesAcrossResolutions
(
unittest
.
TestCase
):
"""
TestCase for modules across resolutions.
"""
"""
TestCase for modules across resolutions.
"""
...
@@ -62,5 +100,9 @@ class TestModulesAcrossResolutions(unittest.TestCase):
...
@@ -62,5 +100,9 @@ class TestModulesAcrossResolutions(unittest.TestCase):
soi
.
reorganize
()
soi
.
reorganize
()
self
.
assertEqual
(
self
.
assertEqual
(
expected_result
,
[
module
[
"
meta
"
]
for
module
in
soi
.
modules
],
expected_result
,
[
module
[
"
meta
"
]
for
module
in
soi
.
modules
],
"
All modules added to SOI and calling reorganize should result in
"
"
expected
'
meta
'
information. Screen is:
\n
"
+
screen_information
(),
)
)
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