remove resolution test, have display information printed during debug step

This commit is contained in:
Ogi 2019-06-08 21:55:32 -07:00
parent 2462195991
commit 5c44d51d6c
4 changed files with 33 additions and 25 deletions

View File

@ -10,19 +10,19 @@ jobs:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
Python27-PyQt4:
Python27-PyQt4-4.8:
python.version: '2.7'
qt.bindings: "pyqt=4"
install.method: "conda"
Python27-PySide:
Python27-PySide-4.8:
python.version: '2.7'
qt.bindings: "pyside"
install.method: "conda"
Python37-PyQt-5.9:
Python36-PyQt-5.9:
python.version: "3.6"
qt.bindings: "pyqt"
install.method: "conda"
Python37-PySide2-5.9:
Python36-PySide2-5.9:
python.version: "3.6"
qt.bindings: "pyside2"
install.method: "conda"
@ -88,7 +88,6 @@ jobs:
then
source activate test-environment-$(python.version)
fi
pip install setuptools wheel
python setup.py bdist_wheel
pip install dist/*.whl
@ -98,11 +97,11 @@ jobs:
inputs:
contents: 'dist/**'
targetFolder: $(Build.ArtifactStagingDirectory)
cleanTargetFolder: true # Optional
displayName: "Copy Distributions To Artifacts"
cleanTargetFolder: true
displayName: "Copy Binary Wheel Distribution To Artifacts"
- task: PublishBuildArtifacts@1
displayName: 'Publish Distributions'
displayName: 'Publish Binary Wheel'
condition: always()
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/dist
@ -130,10 +129,18 @@ jobs:
pip list
echo pyqtgraph system info
python -c "import pyqtgraph as pg; pg.systemInfo()"
echo display information
if [ $(agent.os) == 'Linux' ]
then
export DISPLAY=:99.0
Xvfb :99 -screen 0 1920x1080x24 &
sleep 3
fi
python -m pyqtgraph.util.get_resolution
displayName: 'Debug Info'
continueOnError: false
- bash: |
- bash: |
if [ $(install.method) == "conda" ]
then
source activate test-environment-$(python.version)

View File

@ -1,10 +0,0 @@
from .. import mkQApp
qApp = mkQApp()
def test_displayResolution():
desktop = qApp.desktop().screenGeometry()
width, height = desktop.width(), desktop.height()
print("\n\nDisplay Resolution Logged as {}x{}\n\n".format(width, height))
assert height > 0 and width > 0

View File

@ -1,7 +1,15 @@
from .. import mkQApp
def getResolution():
def test_screenInformation():
qApp = mkQApp()
desktop = qApp.desktop().screenGeometry()
return (desktop.width(), desktop.height())
desktop = qApp.desktop()
resolution = desktop.screenGeometry()
availableResolution = desktop.availableGeometry()
print("Screen resolution: {}x{}".format(resolution.width(), resolution.height()))
print("Available geometry: {}x{}".format(availableResolution.width(), availableResolution.height()))
print("Number of Screens: {}".format(desktop.screenCount()))
return None
if __name__ == "__main__":
test_screenInformation()

View File

@ -1,11 +1,14 @@
[pytest]
xvfb_width = 1920
xvfb_height = 1080
# use this due to some issues with ndarray reshape errors on CI systems
xvfb_colordepth = 24
addopts = --faulthandler-timeout=15
filterwarnings =
# comfortable skipping these warnings runtime warnings
# https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility
ignore:numpy.ufunc size changed, may indicate binary incompatibility.*:RuntimeWarning
# Warnings generated from PyQt5.9
ignore:*U.*mode is deprecated:DeprecationWarning
ignore:This method will be removed in future versions. Use 'tree.iter\(\)' or 'list\(tree.iter\(\)\)' instead.:PendingDeprecationWarning
ignore:This method will be removed in future versions. Use 'tree.iter\(\)' or 'list\(tree.iter\(\)\)' instead.:PendingDeprecationWarning
ignore:'U' mode is deprecated\nplugin = open\(filename, 'rU'\):DeprecationWarning