diff options
| -rw-r--r-- | src/org/stsci/Conda.groovy | 2 | ||||
| -rw-r--r-- | src/org/stsci/CondaInstaller.groovy | 2 | ||||
| -rw-r--r-- | src/org/stsci/OSInfo.groovy | 2 | ||||
| -rw-r--r-- | testing.groovy | 27 | 
4 files changed, 30 insertions, 3 deletions
diff --git a/src/org/stsci/Conda.groovy b/src/org/stsci/Conda.groovy index da488bc..d406cc9 100644 --- a/src/org/stsci/Conda.groovy +++ b/src/org/stsci/Conda.groovy @@ -1,6 +1,6 @@  package org.stsci -class Conda { +class Conda implements Serializable {      public String prefix      public boolean prefix_exists      public Map<String, String> shell_environment diff --git a/src/org/stsci/CondaInstaller.groovy b/src/org/stsci/CondaInstaller.groovy index e1cef45..50f7f50 100644 --- a/src/org/stsci/CondaInstaller.groovy +++ b/src/org/stsci/CondaInstaller.groovy @@ -1,7 +1,7 @@  package org.stsci  import org.stsci.OSInfo -class CondaInstaller { +class CondaInstaller implements Serializable {      OSInfo os      String prefix      String dist_version diff --git a/src/org/stsci/OSInfo.groovy b/src/org/stsci/OSInfo.groovy index a29a1db..5d6c93b 100644 --- a/src/org/stsci/OSInfo.groovy +++ b/src/org/stsci/OSInfo.groovy @@ -1,6 +1,6 @@  package org.stsci -class OSInfo { +class OSInfo implements Serializable {      public String name      public String version      public String arch diff --git a/testing.groovy b/testing.groovy new file mode 100644 index 0000000..1436bcc --- /dev/null +++ b/testing.groovy @@ -0,0 +1,27 @@ +import org.stsci.* + +static void main(String[] args) { +    final String PREFIX = "/tmp/miniconda3" +    final String NAME = "astroconda35" +    final String PKGS = "python=3.5 numpy=1.12 drizzlepac" + +    cinst = new CondaInstaller(PREFIX) +    cinst.install() + +    c = new Conda(PREFIX) +    assert c.prefix_exists == true + +    c.override = true +    c.channels.add("astropy") +    c.channels.add("http://ssb.stsci.edu/astroconda") +    c.channels.add("conda-forge") + +    if (c.provides(NAME)) { +        assert c.destroy(NAME) == 0 +    } +    assert c.create(NAME, PKGS) == 0 +    c.activate(NAME) +    assert c.environment_name == NAME +    assert c.provides(NAME) == true +} +  | 
