a6971c768d
To reduce complexity, and make it easier to add more images and tests, the images in the `test-data` repository should be merged with the main repository. Furthermore, we can remove a lot of the subprocess work in the image_testing.py file, as we no longer need to have it interact with git. The images are not the same. Images were regenerated with Qt6, and now have proper big and little endian handling thanks to @pijyoi Second commit is a slightly modified variant of 2e135ab282d6007b34a3854921be54d0e9efb241 authored by @pijyoi it is to convert qimages to RGBA8888 for testing. Image files were regenerated images for the big/little handling Fixed issue with bogus test from test_NonUniformImage and generated a new image
32 lines
731 B
Python
32 lines
731 B
Python
# -*- coding: utf-8 -*-
|
|
#try:
|
|
# from PyQt5 import sip
|
|
#except ImportError:
|
|
# import sip
|
|
# sip.setapi('QString', 1)
|
|
|
|
import pyqtgraph as pg
|
|
pg.mkQApp()
|
|
|
|
import pyqtgraph.dockarea as da
|
|
|
|
def test_dock():
|
|
name = pg.asUnicode("évènts_zàhéér")
|
|
dock = da.Dock(name=name)
|
|
# make sure unicode names work correctly
|
|
assert dock.name() == name
|
|
# no surprises in return type.
|
|
assert type(dock.name()) == type(name)
|
|
|
|
def test_closable_dock():
|
|
name = "Test close dock"
|
|
dock = da.Dock(name=name, closable=True)
|
|
|
|
assert dock.label.closeButton != None
|
|
|
|
def test_hide_title_dock():
|
|
name = "Test hide title dock"
|
|
dock = da.Dock(name=name, hideTitle=True)
|
|
|
|
assert dock.labelHidden == True
|