1#!/usr/bin/env vpython3 2 3# Copyright 2021 The Chromium Authors 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7import sys 8 9from pyfakefs import fake_filesystem_unittest 10 11import exe_util 12 13 14class ExeUtilTests(fake_filesystem_unittest.TestCase): 15 def test_run_and_tee_output(self): 16 # Test wrapping Python as it echos a '.' character back. 17 args = [sys.executable, '-c', "print('.')"] 18 output = exe_util.run_and_tee_output(args) 19 self.assertEqual('.', output.strip()) 20