diff --git a/.travis.yml b/.travis.yml
index 9f1999b..18c4269 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
 language: python
 python:
-    - '2.6'
     - '2.7'
     - '3.4'
 install:
diff --git a/ARCCSSive/cli/compare_ESGF.py b/ARCCSSive/cli/compare_ESGF.py
index 7d343f6..b74610c 100644
--- a/ARCCSSive/cli/compare_ESGF.py
+++ b/ARCCSSive/cli/compare_ESGF.py
@@ -25,6 +25,16 @@ from ARCCSSive.CMIP5.pyesgf_functions import ESGFSearch
 from ARCCSSive.CMIP5.other_functions import assign_mips, combine_constraints 
 from ARCCSSive.CMIP5.compare_helpers import *
 import sys
+from six.moves import input
+from distutils.util import strtobool
+
+def query_yes_no(prompt):
+    answer = input(prompt)
+    try:
+        return strtobool(answer)
+    except ValueError:
+        print("Please answer Y or N")
+        return query_yes_no(prompt)
 
 def parse_input():
     ''' Parse input arguments '''
@@ -148,11 +158,8 @@ def main():
                 print("Nothing currently available on ESGF nodes and no local version exists for constraints:\n",constraints,"and variables:",variables)
         else:
             print(esgf.ds_count(),"instances were found on ESGF and ",outputs.count()," on the local database")
-            if sys.version_info < ( 3, 0 ):
-                request=raw_input("Do you want to proceed with comparison (Y) or write current results (N) ? Y/N \n")
-            else:
-                request=input("Do you want to proceed with comparison (Y) or write current results (N) ? Y/N \n")
-            if request == "Y":
+            request = query_yes_no("Do you want to proceed with comparison (Y) or write current results (N) ? Y/N \n")
+            if request:
                 esgf_results, db_results=compare_instances(cmip5.session, esgf_results, db_results, orig_args.keys(), admin)
 
     # build table to summarise results
@@ -184,11 +191,8 @@ def main():
                         print(s.split("'")[0])
                         fout.writelines("'" +s + "'\n")
                     fout.close()
-                    if sys.version_info < ( 3, 0 ):
-                        request2=raw_input("submit a request to download these files? Y/N \n")
-                    else:
-                        request2=input("submit a request to download these files? Y/N \n")
-                    if request2 == "Y": os.system ("cp %s %s" % (outfile, outdir+outfile)) 
+                    request2 = query_yes_no("submit a request to download these files? Y/N \n")
+                    if request2: os.system ("cp %s %s" % (outfile, outdir+outfile)) 
         for var in variables:
             remote=[ds for ds in esgf_results if ds['variable']==var]
             local=[v for v in db_results if v.variable.__dict__['variable']==var]
diff --git a/conda/meta.yaml b/conda/meta.yaml
index 500d3f2..38bf6ef 100644
--- a/conda/meta.yaml
+++ b/conda/meta.yaml
@@ -29,9 +29,11 @@ requirements:
 test:
     source_files:
         - setup.cfg
+        - conftest.py
         - tests
     requires:
         - pytest
+        - mock # [py2k]
     commands:
         - py.test
         - search_replica -h

Make compare_ESGF questions case-insensitive
Currently compare_ESGF responses must be a capital `Y`. Make this case-insensitive, possibly also so that it works with 'yes'
diff --git a/conftest.py b/conftest.py
index 57150ac..9495faf 100644
--- a/conftest.py
+++ b/conftest.py
@@ -11,3 +11,4 @@ if sys.version_info >= (3,0):
     collect_ignore.append('ARCCSSive/CMIP5/pyesgf_functions.py')
     collect_ignore.append('ARCCSSive/CMIP5/compare_helpers.py')
     collect_ignore.append('ARCCSSive/cli/compare_ESGF.py')
+    collect_ignore.append('tests/cli/test_compare_ESGF.py')
diff --git a/tests/cli/test_compare_ESGF.py b/tests/cli/test_compare_ESGF.py
new file mode 100644
index 0000000..fd046c7
--- /dev/null
+++ b/tests/cli/test_compare_ESGF.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+# Copyright 2018 ARC Centre of Excellence for Climate Systems Science
+# author: Scott Wales <scott.wales@unimelb.edu.au>
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from __future__ import print_function
+from ARCCSSive.cli.compare_ESGF import *
+import mock
+
+def sample_query_yes_no(answer, value):
+    with mock.patch('ARCCSSive.cli.compare_ESGF.input', return_value=answer) as inp:
+        assert query_yes_no("") == value
+
+def test_query_yes_no():
+    sample_query_yes_no("Y", True)
+    sample_query_yes_no("y", True)
+    sample_query_yes_no("yes", True)
+    sample_query_yes_no("yEs", True)
+
+    sample_query_yes_no("N", False)
+    sample_query_yes_no("n", False)
+    sample_query_yes_no("no", False)
+    sample_query_yes_no("nO", False)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
-e git+https://github.com/coecms/ARCCSSive.git@2188bbb4aa2a34f1c3c6e3508bf98c0ee9d2703e#egg=ARCCSSive
attrs==25.3.0
babel==2.17.0
cattrs==24.1.3
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
commonmark==0.9.1
cryptography==44.0.2
defusedxml==0.7.1
docutils==0.21.2
esgf-pyclient==0.3.1
exceptiongroup==1.2.2
greenlet==3.1.1
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==3.0.2
mock==5.2.0
MyProxyClient==2.1.1
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
pycparser==2.22
Pygments==2.19.1
pyOpenSSL==25.0.0
pytest==8.3.5
recommonmark==0.7.1
requests==2.32.3
requests-cache==1.2.1
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
SQLAlchemy==2.0.40
tomli==2.2.1
typing_extensions==4.13.0
url-normalize==2.2.0
urllib3==2.3.0
WebOb==1.8.9
zipp==3.21.0

name: ARCCSSive
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - attrs==25.3.0
      - babel==2.17.0
      - cattrs==24.1.3
      - certifi==2025.1.31
      - cffi==1.17.1
      - charset-normalizer==3.4.1
      - commonmark==0.9.1
      - cryptography==44.0.2
      - defusedxml==0.7.1
      - docutils==0.21.2
      - esgf-pyclient==0.3.1
      - exceptiongroup==1.2.2
      - greenlet==3.1.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - mock==5.2.0
      - myproxyclient==2.1.1
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycparser==2.22
      - pygments==2.19.1
      - pyopenssl==25.0.0
      - pytest==8.3.5
      - recommonmark==0.7.1
      - requests==2.32.3
      - requests-cache==1.2.1
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - sqlalchemy==2.0.40
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - url-normalize==2.2.0
      - urllib3==2.3.0
      - webob==1.8.9
      - zipp==3.21.0
prefix: /opt/conda/envs/ARCCSSive

tests/cli/test_compare_ESGF.py::test_query_yes_no
.travis.yml conda/meta.yaml ARCCSSive/cli/compare_ESGF.py
.travis.yml conda/meta.yaml ARCCSSive/cli/compare_ESGF.py