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

Public Member Functions

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

Public Attributes

 new_cwd
 
 old_cwd
 

Static Public Attributes

str old_cwd = ''
 
str new_cwd = ''
 

Detailed Description

A scoped change in the CWD.

Definition at line 1038 of file run_tests.py.

Constructor & Destructor Documentation

◆ __init__()

run_tests.DirectoryChange.__init__ (   self,
str  new_cwd 
)

Definition at line 1045 of file run_tests.py.

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

Member Function Documentation

◆ __enter__()

run_tests.DirectoryChange.__enter__ (   self)

Definition at line 1048 of file run_tests.py.

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

◆ __exit__()

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

Definition at line 1052 of file run_tests.py.

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

Member Data Documentation

◆ new_cwd [1/2]

str run_tests.DirectoryChange.new_cwd = ''
static

Definition at line 1043 of file run_tests.py.

◆ new_cwd [2/2]

run_tests.DirectoryChange.new_cwd

Definition at line 1046 of file run_tests.py.

◆ old_cwd [1/2]

str run_tests.DirectoryChange.old_cwd = ''
static

Definition at line 1042 of file run_tests.py.

◆ old_cwd [2/2]

run_tests.DirectoryChange.old_cwd

Definition at line 1049 of file run_tests.py.


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