Example #1
0
def test_Box_calc_sizes():
	Box.calc_sizes()
	assert CpuBox.width == MemBox.width + ProcBox.width == NetBox.width + ProcBox.width == 80
	assert CpuBox.height + ProcBox.height == CpuBox.height + MemBox.height + NetBox.height == 25
Example #2
0
def test_ProcBox_draw():
	Box.calc_sizes()
	assert len(ProcBox._draw_bg()) > 1
	ProcBox._draw_fg()
	assert "proc" in Draw.strings
Example #3
0
def test_MemBox_draw():
	bpytop.CONFIG.show_disks = True
	Box.calc_sizes()
	assert len(MemBox._draw_bg()) > 1
	MemBox._draw_fg()
	assert "mem" in Draw.strings
Example #4
0
def test_NetBox_draw():
	Box.calc_sizes()
	assert len(NetBox._draw_bg()) > 1
	NetBox._draw_fg()
	assert "net" in Draw.strings
Example #5
0
def test_CpuBox_draw():
	Box.calc_sizes()
	assert len(CpuBox._draw_bg()) > 1
	CpuBox._draw_fg()
	assert "cpu" in Draw.strings