test_progress_bar.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. __author__ = "Christian Heider Nielsen"
  4. __doc__ = r"""
  5. Created on 30-12-2020
  6. """
  7. from draugr.visualisation.progress import progress_bar
  8. def test_progress_bar():
  9. for a in progress_bar(range(100), notifications=False):
  10. pass
  11. def test_asudhweasijdq():
  12. sas = [f"a{a}" for a in range(5)]
  13. for a in progress_bar(sas, notifications=False):
  14. pass
  15. def test_asudhwea213si23jdq():
  16. def sas(l):
  17. """description"""
  18. yield from range(l)
  19. for a in progress_bar(sas(129), notifications=False):
  20. pass
  21. def test_asudhweasi23jdq():
  22. def sas() -> None:
  23. """
  24. :rtype: None
  25. """
  26. yield from range(100)
  27. for a in progress_bar(sas(), notifications=False):
  28. pass
  29. def test_dsad3123():
  30. for a in progress_bar([2.13, 8921.9123, 923], notifications=False):
  31. pass
  32. def test_dsad311231223():
  33. for a in progress_bar(
  34. (
  35. 2.13,
  36. 8921.9123,
  37. 923,
  38. 821738,
  39. 782173,
  40. 8912738124,
  41. 8471827,
  42. 661262,
  43. 1111,
  44. 2222,
  45. 3333,
  46. 4444,
  47. 5555,
  48. ),
  49. notifications=False,
  50. ):
  51. pass
  52. def test_ds12sadad311231223():
  53. for a in progress_bar(
  54. {
  55. 2.13j,
  56. 8921.9123j,
  57. 923j,
  58. 821738j,
  59. 782173j,
  60. 8912738124j,
  61. 8471827j,
  62. 661262j,
  63. 1111j,
  64. 2222j,
  65. 3333j,
  66. 4444j,
  67. 5555j,
  68. },
  69. notifications=False,
  70. ):
  71. pass
  72. def test_ds12s23():
  73. for a in progress_bar(
  74. [[2.13j], [8921.9123j], [923j], [821738j], [782173j]], notifications=False
  75. ):
  76. pass
  77. def test_ds1saijd2s23():
  78. a1 = range(6)
  79. b2 = range(6)
  80. for _ in progress_bar(a1, notifications=False):
  81. pass
  82. for _ in progress_bar(b2, notifications=False):
  83. pass
  84. def test_dict_items():
  85. from time import sleep
  86. class exp_v:
  87. Test_Sets = {v: v for v in range(9)}
  88. for a in progress_bar(exp_v.Test_Sets.items()):
  89. sleep(1)
  90. if __name__ == "__main__":
  91. test_progress_bar()
  92. test_asudhweasijdq()
  93. test_asudhweasi23jdq()
  94. test_dsad3123()
  95. test_dsad311231223()
  96. test_ds12sadad311231223()
  97. test_ds12s23()
  98. test_asudhwea213si23jdq()
  99. test_ds1saijd2s23()
  100. test_dict_items()