1

I want to test a python program which contains threads. I have searched for testing tools but I do not understand how to use them. For example I found the PyUnit which uses the unittest library but I still dont know how to test the runtime or the memory that my program use. I found and downloaded the JetBrains pycharm which is a platform like NetBeans and Eclipse in order to run and debug , compile and test my programs but I couldnt use it. Can you please tell my how can I test my program using simple methods/functions ? Do I have to merge my code with a unittest class which contains methods tests ?

Thank You.

  • What do you mean by test? It's conventional to write some tests to use in a unit testing framework, like unittest – doctorlove Dec 06 '13 at 15:30
  • I want to use a unit testing framework to test runtime , memory and find additional things to test in a program. So I have to write my own tests ? And how can i connect these tests with my program ? – Marios Filipidis Dec 06 '13 at 15:38
  • 1
    http://stackoverflow.com/questions/582336/how-can-you-profile-a-python-script – XORcist Dec 06 '13 at 15:50
  • 1
    What you want is called profiling and not testing. The concept of Unit Tests is to test a single unit (a function, a method, etc.) for its validity. Integration tests are pretty complicated to set up and runtime interactions and memory usage is dealt with profiling. – Soravux Dec 06 '13 at 19:04

0 Answers0