def __check_sub_frames(center, sub_frames): from ..frame import Frame from ...track.base import Track sub_f_names = ", ".join(sub_frames.keys()) if (not isinstance(center, Track)) and (not hasattr( center, "plot_joint")): raise TypeError( "center should be a Track type instance with plot_joint method, " "for example Cool, DotHiC, ...") for k, f in sub_frames.items(): if not isinstance(f, Frame): if isinstance(f, Track): sub_frames[k] = (Frame() + f) # convert track to frame else: raise TypeError(f"{sub_f_names} should be Frame object.")
def test_frame_widgetspanel(): assert isinstance(Frame() + WidgetsPanel(), Browser) assert isinstance(WidgetsPanel() + Frame(), Browser)
def test_track_add_frame(): assert isinstance(Frame() + Track({}), Frame) assert isinstance(Track({}) + Frame(), Frame)