I've create nose test:
import nose
from nose.tools import istest, nottest
nose.run()
path1 = "/some/my/path1/"
path2 = "/some/my/path2/"
@istest
def compare_dir(path1, path2):
my_bool = mytest, bool
yield my_test, my_bool
sub_path1 = path1 + "some_path"
sub_path2 = path2 + "some_path"
compare_dir(sub_path1, sub_path2)
def my_test(is_equal):
assert is_equal, "Not equal!"
And I've got error:
Traceback (most recent call last):
File "/Python27/lib/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
TypeError: compare_dir() takes exactly 2 arguments (0 given)
What am I do wrong? I've already give 2 arguments for compare_dir
.
I've start test as
/path/to/my/test/my_test_name.py --tests=my_test_name