local_output_manager_test.py (908B)
1 #! /usr/bin/env vpython3 2 # Copyright 2017 The Chromium Authors 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 6 # pylint: disable=protected-access 7 8 import tempfile 9 import shutil 10 import unittest 11 12 from pylib.base import output_manager 13 from pylib.base import output_manager_test_case 14 from pylib.output import local_output_manager 15 16 17 class LocalOutputManagerTest(output_manager_test_case.OutputManagerTestCase): 18 19 def setUp(self): 20 self._output_dir = tempfile.mkdtemp() 21 self._output_manager = local_output_manager.LocalOutputManager( 22 self._output_dir) 23 24 def testUsableTempFile(self): 25 self.assertUsableTempFile( 26 self._output_manager._CreateArchivedFile( 27 'test_file', 'test_subdir', output_manager.Datatype.TEXT)) 28 29 def tearDown(self): 30 shutil.rmtree(self._output_dir) 31 32 33 if __name__ == '__main__': 34 unittest.main()