1

多くの人々がNFSマウントを介して使用する共通のLinuxディレクトリに多くのpythonモジュールをインストールしました(はい、pythonでこのespを使用するとパフォーマンスが低下することを理解しています)scipyを実行できました。 NFS マウントと root を所有するユーザーとして test('full') を実行します。

sc_* および linux227compiled_catalog.d* ファイルをビルドするディレクトリを伝える scipy.test() 関数に引数を渡す方法はありますか? つまり、scpipt.test('full', /tmp) をマウントして、これをマウントするすべてのユーザーがこれらのテストを実行でき、NFS マウントへの書き込みアクセス権を持たないようにしますか?

前もって感謝します。

4

1 に答える 1

0

nvm ... テストスクリプトに以下を入れました:

import scipy
import os
import shutil

directory = os.getcwd()

userHomeDirectory = ( "/home/" + os.getlogin())
userHomeScipyTests = ( userHomeDirectory + "/scipytests" )

#               print ("your current directory location is: " + directory)
print ("Making the following temp folder:  " + userHomeScipyTests )
if (os.path.isdir(userHomeScipyTests)):
        shutil.rmtree(userHomeScipyTests)

os.makedirs ( userHomeScipyTests )
os.chdir( userHomeScipyTests )
print os.getcwd()
output = scipy.test('full')
#               print ("this is the output of the scipy full test: " + str(output.wasSuccessful()))
self.assertEqual(str(output.wasSuccessful()), 'True', 'FullSciPyTest failed')
if (output.wasSuccessful):
print ("Removing the following temp folder: " + userHomeScipyTests )
    shutil.rmtree(userHomeScipyTests)
于 2012-11-14T17:59:40.093 に答える