2021-08-02 04:43:32 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2014-02-12 08:02:09 +00:00
|
|
|
import pyqtgraph as pg
|
|
|
|
pg.mkQApp()
|
|
|
|
|
|
|
|
import pyqtgraph.dockarea as da
|
|
|
|
|
|
|
|
def test_dock():
|
2021-08-02 04:43:32 +00:00
|
|
|
name = "évènts_zàhéér"
|
2014-02-12 08:02:09 +00:00
|
|
|
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)
|
2019-06-28 04:51:54 +00:00
|
|
|
|
|
|
|
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
|