test.py 840 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. from time import sleep
  2. from teamux import tmux
  3. def test_s_window_new():
  4. w = tmux.active.new('test_new')
  5. w.close()
  6. def test_n_window_split():
  7. w = tmux.active.new('test_split')
  8. w.split()
  9. w.close()
  10. def test_f_pane_resize():
  11. w = tmux.active.new('test_resize')
  12. w.split()
  13. w.right.width = 20
  14. sleep(2)
  15. w.left.width = 30
  16. sleep(2)
  17. w.left.width = 90
  18. w.close()
  19. def test_f_pane_zoom():
  20. w = tmux.active.new('test_resize')
  21. w.split()
  22. w.right.send('# RIGHT')
  23. w.left.send('# LEFT')
  24. sleep(2)
  25. w.right.zoom()
  26. sleep(2)
  27. w.right.zoom()
  28. w.left.zoom()
  29. sleep(2)
  30. w.left.zoom()
  31. sleep(2)
  32. w.close()
  33. def test_f_pane_print():
  34. w = tmux.active.new('test_print')
  35. w.split()
  36. for pane in w.panes:
  37. print(pane)
  38. w.close()
  39. test_f_pane_print()