"""Tests for neurodocker.interfaces.Miniconda"""
# Author: Jakub Kaczmarzyk <jakubk@mit.edu>
from __future__ import absolute_import, division, print_function

import pytest

from neurodocker.interfaces import Miniconda
from neurodocker.interfaces.tests import utils

class TestMiniconda(object):
    """Tests for Miniconda class."""

    @pytest.mark.skip(reason="running container in background does not find correct Python")
    def test_build_image_miniconda_latest_shellscript_xenial(self):
        """Install latest version of Miniconda via ContinuumIO's installer
        script on Ubuntu Xenial.
        """
        specs = {'pkg_manager': 'yum',
                 'check_urls': True,
                 'instructions': [
                    ('base', 'centos:7'),
                    ('user', 'neuro'),
                    ('miniconda', {
                        'python_version': '3.6.1',
                        # 'conda_install': ['traits'],
                        # 'pip_install': ['https://github.com/nipy/nipype/archive/master.tar.gz']
                    })
                 ]}
        container = utils.get_container_from_specs(specs)
        output = container.exec_run('python -V')
        assert "3.5.1" in output, "incorrect Python version"
        output = container.exec_run('python -c "import nipype"')
        assert "ImportError" not in output, "nipype not installed"
        utils.test_cleanup(container)

@@ -331,16 +331,17 @@
 %22%22%0A%0A    
+#
 @pytest.
@@ -837,16 +837,63 @@
 nda', %7B%0A
+                        'env_name': 'default',%0A
         
@@ -933,9 +933,9 @@
  '3.
-6
+5
 .1',
@@ -958,18 +958,16 @@
         
- #
  'conda_
@@ -1011,18 +1011,16 @@
         
- #
  'pip_in

update test following change in miniconda installation