Pythonでテストを実行する時nose
のnosetests
を使っているのですがVagrantのshared_folderでマウントしてるディレクトリでnosetestsと実行してもテストクラスとして有効になりませんでした。
原因は対象となるファイルに実行権があるとデフォルトでは対象外になるみたいです。
Finding and running tests
マニュアルにも書いてあるのですが
Files with the executable bit set are ignored by default under Unix-style operating systems–use --exe to allow collection from them, but be careful that is safe to do so. Under Windows, executable files will be picked up by default since there is no executable bit to test.
上記のように--exe
オプションをつければ対象となります。