For a unit test, I need a zipfile that contains directory entries. In a pinch, I could create one manually and keep it in the repo in binary form, but I'd rather create it dynamically as part of the test setup. Neither the zipfile module nor shutil.make_archive seems to be able to create directory entries. Is there a native-python solution? Continue reading...