Esempio n. 1
0
 def test_get_installdir(self):
     '''get install directory should return the base of where singularity
     is installed
     '''
     print("Testing utils.get_installdir")
     from spython.utils import get_installdir
     whereami = get_installdir()
     print(whereami)
     self.assertTrue('spython' in whereami)
Esempio n. 2
0
def test_get_installdir():
    """get install directory should return the base of where singularity
    is installed
    """
    print("Testing utils.get_installdir")
    from spython.utils import get_installdir

    whereami = get_installdir()
    print(whereami)
    assert whereami.endswith("spython")
Esempio n. 3
0
def sandbox(tmp_path):
    image = Client.build("docker://busybox:1.30.1",
                         image=str(tmp_path / 'sandbox'),
                         sandbox=True,
                         sudo=False)

    assert os.path.exists(image)

    config = os.path.join(get_installdir(), 'oci', 'config.json')
    shutil.copyfile(config, os.path.join(image, 'config.json'))
    return image
Esempio n. 4
0
def installdir():
    return get_installdir()
Esempio n. 5
0
 def setUp(self):
     self.pwd = get_installdir()
     self.tmpdir = tempfile.mkdtemp()