用python tempfile.mkdtemp在gitlab-ci docker中创buildPbs

gitlab-ci.yml运行一个简单的gitlab-ci.yml我得到这个错误::

 ====================================================================== ERROR: test_save_plots_in_one_file (tests.test_plots.TestPlotUtilities) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builds/r_d/prod/tests/test_plots.py", line 66, in test_save_plots_in_one_file tempdir = tempfile.mkdtemp() File "/usr/local/lib/python2.7/tempfile.py", line 339, in mkdtemp _os.mkdir(file, 0700) OSError: [Errno 2] No such file or directory: '/tmp/tmpivScxU' ---------------------------------------------------------------------- Ran 184 tests in 19.584s 

unittest ::

  def test_save_plots_in_one_file(self): path = os.path.dirname(os.path.abspath(__file__)) tempdir = tempfile.mkdtemp() ...