For example, my folder structure is:
original/dev
original/prd
(note that dev
and prd
are folders and not files)
I would like to check if within the original
folder is there anything else besides my desired dev
and prd
folders. My problem is that this undesired folder could have any name.
What I had in mind for the first part:
assert os.path.exists(os.path.join('tests','testvars','dev')) # it works
assert os.path.exists(os.path.join('tests','testvars','prod')) # it works
# It does not work. Just an idea:
assert os.path.exists(os.path.join('tests','testvars',"anything besides prd && dev"))
As you can notice, this last part would throw an assert error other folders (besides prd
and dev
) exist.