Repository: DataBiosphere/toil

Issue:
Test collection fails if boto isn't installed
```
================================================ ERRORS ================================================

_________________________ ERROR collecting src/toil/jobStores/aws/jobStore.py __________________________

src/toil/jobStores/aws/jobStore.py:31: in <module>

    from boto.sdb.domain import Domain

E   ImportError: No module named boto.sdb.domain

_________________________ ERROR collecting src/toil/jobStores/aws/jobStore.py __________________________

src/toil/jobStores/aws/jobStore.py:31: in <module>

    from boto.sdb.domain import Domain

E   ImportError: No module named boto.sdb.domain

_________________________ ERROR collecting src/toil/jobStores/aws/sdbUtils.py __________________________

src/toil/jobStores/aws/sdbUtils.py:21: in <module>

    from boto.exception import SDBResponseError, BotoServerError

E   ImportError: No module named boto.exception

_________________________ ERROR collecting src/toil/jobStores/aws/sdbUtils.py __________________________

src/toil/jobStores/aws/sdbUtils.py:21: in <module>

    from boto.exception import SDBResponseError, BotoServerError

E   ImportError: No module named boto.exception

_______________________ ERROR collecting src/toil/test/jobStores/jobStoreTest.py _______________________

src/toil/test/jobStores/jobStoreTest.py:31: in <module>

    from toil.jobStores.aws.jobStore import AWSJobStore

.eggs/pytest-2.7.2-py2.7.egg/_pytest/assertion/rewrite.py:165: in load_module

    py.builtin.exec_(co, mod.__dict__)

src/toil/jobStores/aws/jobStore.py:31: in <module>

    from boto.sdb.domain import Domain

E   ImportError: No module named boto.sdb.domainto
```

Test collection fails if boto isn't installed
```
================================================ ERRORS ================================================

_________________________ ERROR collecting src/toil/jobStores/aws/jobStore.py __________________________

src/toil/jobStores/aws/jobStore.py:31: in <module>

    from boto.sdb.domain import Domain

E   ImportError: No module named boto.sdb.domain

_________________________ ERROR collecting src/toil/jobStores/aws/jobStore.py __________________________

src/toil/jobStores/aws/jobStore.py:31: in <module>

    from boto.sdb.domain import Domain

E   ImportError: No module named boto.sdb.domain

_________________________ ERROR collecting src/toil/jobStores/aws/sdbUtils.py __________________________

src/toil/jobStores/aws/sdbUtils.py:21: in <module>

    from boto.exception import SDBResponseError, BotoServerError

E   ImportError: No module named boto.exception

_________________________ ERROR collecting src/toil/jobStores/aws/sdbUtils.py __________________________

src/toil/jobStores/aws/sdbUtils.py:21: in <module>

    from boto.exception import SDBResponseError, BotoServerError

E   ImportError: No module named boto.exception

_______________________ ERROR collecting src/toil/test/jobStores/jobStoreTest.py _______________________

src/toil/test/jobStores/jobStoreTest.py:31: in <module>

    from toil.jobStores.aws.jobStore import AWSJobStore

.eggs/pytest-2.7.2-py2.7.egg/_pytest/assertion/rewrite.py:165: in load_module

    py.builtin.exec_(co, mod.__dict__)

src/toil/jobStores/aws/jobStore.py:31: in <module>

    from boto.sdb.domain import Domain

E   ImportError: No module named boto.sdb.domainto
```



Discussion:

Resolving patch:
diff --git a/src/toil/jobStores/conftest.py b/src/toil/jobStores/conftest.py
--- a/src/toil/jobStores/conftest.py
+++ b/src/toil/jobStores/conftest.py
@@ -24,4 +24,4 @@
 try:
     import boto
 except ImportError:
-    collect_ignore.append("awsJobStore.py")
+    collect_ignore.append("aws")


Test patch:
diff --git a/src/toil/test/jobStores/jobStoreTest.py b/src/toil/test/jobStores/jobStoreTest.py
--- a/src/toil/test/jobStores/jobStoreTest.py
+++ b/src/toil/test/jobStores/jobStoreTest.py
@@ -28,7 +28,6 @@
 from toil.common import Config
 from toil.jobStores.abstractJobStore import (AbstractJobStore, NoSuchJobException,
                                              NoSuchFileException)
-from toil.jobStores.aws.jobStore import AWSJobStore
 from toil.jobStores.fileJobStore import FileJobStore
 from toil.test import ToilTest, needs_aws, needs_azure, needs_encryption
 
@@ -465,6 +464,7 @@ def _createJobStore(self, config=None):
         return AWSJobStore(self.testRegion, self.namePrefix, config=config)
 
     def testInlinedFiles(self):
+        from toil.jobStores.aws.jobStore import AWSJobStore
         master = self.master
         for encrypted in (True, False):
             n = AWSJobStore.FileInfo.maxInlinedSize(encrypted)
@@ -498,10 +498,12 @@ def testLargeFile(self):
         self.assertEqual(hashIn.digest(),hashOut.digest())
 
     def _largeLogEntrySize(self):
+        from toil.jobStores.aws.jobStore import AWSJobStore
         # So we get into the else branch of reader() in uploadStream(multiPart=False):
         return AWSJobStore.FileInfo.maxBinarySize() * 2
 
     def _batchDeletionSize(self):
+        from toil.jobStores.aws.jobStore import AWSJobStore
         return AWSJobStore.itemsPerBatchDelete