def METHOD_NAME(self):
    d = tempfile.mkdtemp()
    try:
        tp = os.path.join(d, "test.tar")
        with open(tp, "wb") as fh:
            with self.assertRaisesRegexp(ValueError, "not a regular"):
                create_tar_from_files(fh, {"test": d})
    finally:
        shutil.rmtree(d)