[aws unit test utils] only create a recordings directory when the env var is set (#45752)
* Only create placebo recording test directories when the environment variable PLACEBO_RECORD is setpull/4420/head
parent
c41632fad2
commit
5467ac3454
|
@ -61,6 +61,10 @@ def placeboify(request, monkeypatch):
|
||||||
# remove the test_ prefix from the function & file name
|
# remove the test_ prefix from the function & file name
|
||||||
).replace('test_', '')
|
).replace('test_', '')
|
||||||
|
|
||||||
|
if not os.getenv('PLACEBO_RECORD'):
|
||||||
|
if not os.path.isdir(recordings_path):
|
||||||
|
raise NotImplementedError('Missing Placebo recordings in directory: %s' % recordings_path)
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
# make sure the directory for placebo test recordings is available
|
# make sure the directory for placebo test recordings is available
|
||||||
os.makedirs(recordings_path)
|
os.makedirs(recordings_path)
|
||||||
|
|
Loading…
Reference in New Issue