def testSrcDoeNotExist(self): tmpdir = os.environ['TEST_TMPDIR'] installer = install_genfiles.Installer('.', output_root=tmpdir) installer.InstallForData(DOES_NOT_EXIST_DATA) self.assertFalse( os.path.lexists( os.path.join(tmpdir, 'bazel-tulsi-includes/x/x/exist.txt')))
def testSrcDoesExist(self): tmpdir = os.environ['TEST_TMPDIR'] installer = install_genfiles.Installer('.', output_root=tmpdir) installer.InstallForData(DOES_EXIST_DATA) # Must use lexists because we create a link but use the wrong exec root, # so the symlink is not valid. self.assertTrue(os.path.lexists( os.path.join(tmpdir, '_tulsi-includes/x/x/install_genfiles.py')))