e7a30b9324
Remove if __name__ == "__main__" bits, replace some == None to is None checks Cleanup variety of static code checker issue Removed missing imports, restructured some logic to make a little cleaner, fixed a function in test_dockarea, unfortunately broke the test so now I tell pytest to expect the Exception.
25 lines
606 B
Python
25 lines
606 B
Python
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
|