You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 13 година
пре 13 година
пре 13 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # -*- coding: utf8 -*-
  2. #
  3. # libcaca Colour ASCII Art library
  4. # Python language bindings
  5. # Copyright (c) 2012 Alex Foulon <alxf@lavabit.com>
  6. # All Rights Reserved
  7. #
  8. # This program is free software. It comes without any warranty, to
  9. # the extent permitted by applicable law. You can redistribute it
  10. # and/or modify it under the terms of the Do What the Fuck You Want
  11. # to Public License, Version 2, as published by Sam Hocevar. See
  12. # http://www.wtfpl.net/ for more details.
  13. #
  14. """ Test module """
  15. #standard module
  16. import unittest
  17. #test modules
  18. from . import canvas
  19. #create modules test suite
  20. canvas_t = unittest.TestSuite()
  21. #define tests for canvas_t test suite
  22. canvas_t.addTest(canvas.CanvasTestCase('test_create'))
  23. canvas_t.addTest(canvas.CanvasTestCase('test_get_width'))
  24. canvas_t.addTest(canvas.CanvasTestCase('test_get_height'))
  25. canvas_t.addTest(canvas.CanvasTestCase('test_set_size'))
  26. canvas_t.addTest(canvas.CanvasTestCase('test_get_char'))
  27. canvas_t.addTest(canvas.CanvasTestCase('test_put_char'))
  28. canvas_t.addTest(canvas.CanvasTestCase('test_put_str'))
  29. canvas_t.addTest(canvas.CanvasTestCase('test_printf'))
  30. canvas_t.addTest(canvas.CanvasTestCase('test_wherex'))
  31. canvas_t.addTest(canvas.CanvasTestCase('test_wherey'))
  32. canvas_t.addTest(canvas.CanvasTestCase('test_gotoxy'))
  33. canvas_t.addTest(canvas.CanvasTestCase('test_clear'))
  34. canvas_t.addTest(canvas.CanvasTestCase('test_get_handle_x'))
  35. canvas_t.addTest(canvas.CanvasTestCase('test_get_handle_y'))
  36. canvas_t.addTest(canvas.CanvasTestCase('test_set_handle'))
  37. canvas_t.addTest(canvas.CanvasTestCase('test_blit'))
  38. canvas_t.addTest(canvas.CanvasTestCase('test_blit_mask'))
  39. canvas_t.addTest(canvas.CanvasTestCase('test_set_boundaries'))
  40. canvas_t.addTest(canvas.CanvasTestCase('test_enable_dirty_rect'))
  41. canvas_t.addTest(canvas.CanvasTestCase('test_add_dirty_rect'))
  42. canvas_t.addTest(canvas.CanvasTestCase('test_remove_dirty_rect'))
  43. canvas_t.addTest(canvas.CanvasTestCase('test_draw_line'))
  44. canvas_t.addTest(canvas.CanvasTestCase('test_draw_thin_line'))
  45. canvas_t.addTest(canvas.CanvasTestCase('test_draw_polyline'))
  46. canvas_t.addTest(canvas.CanvasTestCase('test_draw_thin_polyline'))
  47. canvas_t.addTest(canvas.CanvasTestCase('test_draw_circle'))
  48. canvas_t.addTest(canvas.CanvasTestCase('test_draw_ellipse'))
  49. canvas_t.addTest(canvas.CanvasTestCase('test_draw_thin_ellipse'))
  50. canvas_t.addTest(canvas.CanvasTestCase('test_fill_ellipse'))
  51. canvas_t.addTest(canvas.CanvasTestCase('test_draw_box'))
  52. canvas_t.addTest(canvas.CanvasTestCase('test_draw_thin_box'))
  53. canvas_t.addTest(canvas.CanvasTestCase('test_draw_cp437_box'))
  54. canvas_t.addTest(canvas.CanvasTestCase('test_fill_box'))
  55. canvas_t.addTest(canvas.CanvasTestCase('test_draw_triangle'))
  56. canvas_t.addTest(canvas.CanvasTestCase('test_draw_thin_triangle'))
  57. canvas_t.addTest(canvas.CanvasTestCase('test_fill_triangle'))
  58. #configure all tests in a single suite
  59. alltests = unittest.TestSuite([canvas_t])