def test_10_ensure_outdir_exists(self): outdir = os.path.join(self.workdir, "outdir") outfile = os.path.join(outdir, "a.txt") TT.ensure_outdir_exists(outfile) self.assertTrue(os.path.exists(outdir))
def test_10_ensure_outdir_exists(self): TT.LOGGER.setLevel(TT.logging.WARN) # suppress info/debug log msgs. outdir = os.path.join(self.workdir, "outdir") outfile = os.path.join(outdir, "a.txt") TT.ensure_outdir_exists(outfile) self.assertTrue(os.path.exists(outdir))
def test_12_ensure_outdir_exists__no_dir(self): TT.ensure_outdir_exists("a.txt") self.assertFalse(os.path.exists(os.path.dirname("a.txt")))