在gitlab-ci docker中使用python tempfile.mkdtemp的Pbs

时间:2017-01-02 20:01:31

标签: python-2.7 docker gitlab-ci

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()
     ...

0 个答案:

没有答案