Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
run_tests.DirectoryChange Class Reference

Public Member Functions

def __init__ (self, str new_cwd)
 
def __enter__ (self)
 
def __exit__ (self, exception_type, exception_value, exception_traceback)
 

Public Attributes

 new_cwd
 
 old_cwd
 

Static Public Attributes

 str
 

Detailed Description

A scoped change in the CWD.

Definition at line 1039 of file run_tests.py.

Constructor & Destructor Documentation

◆ __init__()

def run_tests.DirectoryChange.__init__ (   self,
str  new_cwd 
)

Definition at line 1046 of file run_tests.py.

1046 def __init__(self, new_cwd: str):
1047 self.new_cwd = new_cwd
1048

Member Function Documentation

◆ __enter__()

def run_tests.DirectoryChange.__enter__ (   self)

Definition at line 1049 of file run_tests.py.

1049 def __enter__(self):
1050 self.old_cwd = os.getcwd()
1051 os.chdir(self.new_cwd)
1052

◆ __exit__()

def run_tests.DirectoryChange.__exit__ (   self,
  exception_type,
  exception_value,
  exception_traceback 
)

Definition at line 1053 of file run_tests.py.

1053 def __exit__(self, exception_type, exception_value, exception_traceback):
1054 os.chdir(self.old_cwd)
1055
1056

Member Data Documentation

◆ new_cwd

run_tests.DirectoryChange.new_cwd

Definition at line 1047 of file run_tests.py.

◆ old_cwd

run_tests.DirectoryChange.old_cwd

Definition at line 1050 of file run_tests.py.

◆ str

run_tests.DirectoryChange.str
static

Definition at line 1043 of file run_tests.py.


The documentation for this class was generated from the following file: