Exemplo n.º 1
0
 def clear_trial_image_dir(self):
     # pylint: disable=missing-docstring
     prep_clear_dirs([
         join(self.env_root,
              self.env_create_time.strftime(self.time_format), "log",
              "images")
     ])
Exemplo n.º 2
0
def test_prep_clear_dirs(tmpdir):
    tmp_dir = str(tmpdir.make_numbered_dir())
    create_file(join(tmp_dir, "some_dir", "some_file"))
    create_file(join(tmp_dir, "some_file2"))
    os.symlink(join(tmp_dir, "some_dir", "some_file"), join(tmp_dir, "some_file3"))
    prep_clear_dirs([tmp_dir])
    assert not os.path.exists(join(tmp_dir, "some_dir", "some_file"))
    assert not os.path.exists(join(tmp_dir, "some_file2"))
    assert not os.path.exists(join(tmp_dir, "some_file3"))
Exemplo n.º 3
0
 def clear_trial_model_dir(self):
     # pylint: disable=missing-docstring
     prep_clear_dirs(
         [
             join(
                 self.env_root,
                 self.env_create_time.strftime(self.time_format),
                 "model",
             )
         ]
     )