لماذا يجد الأنف اختبارات في الملفات التي تحتوي على 644 إذنًا فقط؟

StackOverflow https://stackoverflow.com/questions/2378146

سؤال

قمت اليوم بتشغيل مجموعة من الدكتوراه باستخدام Python 2.6 على Ubuntu 9.10 مع الأنف:

nosetests --with-doctest
Ran 0 tests in 0.001s

OK

ماهذا الهراء؟ كان لدي اختبارات في تلك الملفات ، لماذا لم يعمل هذا؟

لقد غيرت الإذن إلى 644:

sudo chmod 644 * -R
nosetests --with-doctest
Ran 11 test in 0.004s

FAILED (errors=1)

تغييره مرة أخرى إلى 777:

sudo chmod 777 * -R
nosetests --with-doctest
Ran 0 tests in 0.001s

OK

لماذا هذا؟ باستخدام 644 ، لا يمكنني حتى تحرير ملفاتي!

هل كانت مفيدة؟

المحلول

جرب ال --exe علَم:

$ nosetests --help

...    

--exe               Look for tests in python modules that are executable.
                    Normal behavior is to exclude executable modules,
                    since they may not be import-safe [NOSE_INCLUDE_EXE]
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top