Pbs with python tempfile.mkdtemp in gitlab-ci docker

1k Views Asked by At

Running a simple unittest from gitlab-ci.yml I get this error::

======================================================================
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

The unittest::

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

There are 0 best solutions below