quinngroup / dr1dl-pyspark

Dictionary Learning in PySpark
Apache License 2.0
1 stars 1 forks source link

Create unit tests for all methods #17

Closed magsol closed 8 years ago

magsol commented 8 years ago

Use either the nose or unittest packages to conduct focused unit testing.

MOJTABAFA commented 8 years ago

I alreadly installed the pytest and checked our program. the final result is as follows. does it means it did not find any problem there ?

[Anaconda3] C:\Anaconda3\Lib\site-packages>py.test DLPC3.py ============================= test session starts ============================= platform win32 -- Python 3.5.0, pytest-2.8.1, py-1.4.30, pluggy-0.3.1 rootdir: C:\Anaconda3\Lib\site-packages, inifile: collected 0 items

============================== in 0.32 seconds ===============================

MOJTABAFA commented 8 years ago

Here is also nose test result for our code :

[Anaconda3] C:\Anaconda3\Lib\site-packages>nosetests -v DLPC3.py


Ran 0 tests in 0.001s

OK

MOJTABAFA commented 8 years ago

@magsol
Actually I'm too beginner in testing the code with nose and pytest (where I found that these 2 way of testing the python codes are more efficient than unittest).But I really get confused, would you please help me about following points ?

  1. As I found in web we should add some methods and codes to our codes and check different part of our program that are working properly or not ? is it right ?
  2. if yes how we should apply it ?
  3. How we can be aware about the correct results of different part of our code ?( mostly the internet codes are very simple like 2*2 = 4 they are checking if the program returns other values the test is failed, But in our case, It totally puzzling for me)
magsol commented 8 years ago

Putting this issue on hold for now.