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 }} vmImage: ${{ parameters.vmImage }}
strategy: strategy:
matrix: matrix:
Python27-PyQt4: Python27-PyQt4-4.8:
python.version: '2.7' python.version: '2.7'
qt.bindings: "pyqt=4" qt.bindings: "pyqt=4"
install.method: "conda" install.method: "conda"
Python27-PySide: Python27-PySide-4.8:
python.version: '2.7' python.version: '2.7'
qt.bindings: "pyside" qt.bindings: "pyside"
install.method: "conda" install.method: "conda"
Python37-PyQt-5.9: Python36-PyQt-5.9:
python.version: "3.6" python.version: "3.6"
qt.bindings: "pyqt" qt.bindings: "pyqt"
install.method: "conda" install.method: "conda"
Python37-PySide2-5.9: Python36-PySide2-5.9:
python.version: "3.6" python.version: "3.6"
qt.bindings: "pyside2" qt.bindings: "pyside2"
install.method: "conda" install.method: "conda"
@ -88,7 +88,6 @@ jobs:
then then
source activate test-environment-$(python.version) source activate test-environment-$(python.version)
fi fi
pip install setuptools wheel pip install setuptools wheel
python setup.py bdist_wheel python setup.py bdist_wheel
pip install dist/*.whl pip install dist/*.whl
@ -98,11 +97,11 @@ jobs:
inputs: inputs:
contents: 'dist/**' contents: 'dist/**'
targetFolder: $(Build.ArtifactStagingDirectory) targetFolder: $(Build.ArtifactStagingDirectory)
cleanTargetFolder: true # Optional cleanTargetFolder: true
displayName: "Copy Distributions To Artifacts" displayName: "Copy Binary Wheel Distribution To Artifacts"
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: 'Publish Distributions' displayName: 'Publish Binary Wheel'
condition: always() condition: always()
inputs: inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/dist pathtoPublish: $(Build.ArtifactStagingDirectory)/dist
@ -130,10 +129,18 @@ jobs:
pip list pip list
echo pyqtgraph system info echo pyqtgraph system info
python -c "import pyqtgraph as pg; pg.systemInfo()" 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' displayName: 'Debug Info'
continueOnError: false continueOnError: false
- bash: | - bash: |
if [ $(install.method) == "conda" ] if [ $(install.method) == "conda" ]
then then
source activate test-environment-$(python.version) 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 from .. import mkQApp
def test_screenInformation():
def getResolution():
qApp = mkQApp() qApp = mkQApp()
desktop = qApp.desktop().screenGeometry() desktop = qApp.desktop()
return (desktop.width(), desktop.height()) 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] [pytest]
xvfb_width = 1920
xvfb_height = 1080
# use this due to some issues with ndarray reshape errors on CI systems # use this due to some issues with ndarray reshape errors on CI systems
xvfb_colordepth = 24 xvfb_colordepth = 24
addopts = --faulthandler-timeout=15 addopts = --faulthandler-timeout=15
filterwarnings = filterwarnings =
# comfortable skipping these warnings runtime warnings # comfortable skipping these warnings runtime warnings
# https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility # https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility
ignore:numpy.ufunc size changed, may indicate binary incompatibility.*:RuntimeWarning ignore:numpy.ufunc size changed, may indicate binary incompatibility.*:RuntimeWarning
# Warnings generated from PyQt5.9 # 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