def bind_to_sandbox(self, sandbox: SandBox) -> None: """Bind spec instance to a physical Anod sandbox. Binding an Anod instance to a sandbox will set the build_space attribute. """ self.__build_space = sandbox.get_build_space( name=self.build_space_name, platform=self.env.platform)
def test_sandbox_rootdir(): sandbox = e3.anod.sandbox.SandBox(root_dir="foo") assert os.path.relpath(sandbox.tmp_dir, sandbox.root_dir) == "tmp" assert ( os.path.relpath( sandbox.get_build_space("bar").root_dir, os.path.join("foo", e3.env.Env().platform), ) == "bar" )
def test_sandbox_rootdir(): sandbox = e3.anod.sandbox.SandBox() with pytest.raises(e3.anod.sandbox.SandBoxError): assert sandbox.root_dir sandbox.root_dir = 'foo' sandbox.root_dir = 'foo' assert os.path.relpath(sandbox.tmp_dir, sandbox.root_dir) == 'tmp' assert os.path.relpath( sandbox.get_build_space('bar', 'build').root_dir, os.path.join('foo', e3.env.Env().platform)) == 'bar'
def test_sandbox_rootdir(): sandbox = e3.anod.sandbox.SandBox() with pytest.raises(e3.anod.sandbox.SandBoxError): assert sandbox.root_dir sandbox.root_dir = "foo" sandbox.root_dir = "foo" assert os.path.relpath(sandbox.tmp_dir, sandbox.root_dir) == "tmp" assert (os.path.relpath( sandbox.get_build_space("bar").root_dir, os.path.join("foo", e3.env.Env().platform), ) == "bar")