-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from wholmgren/skip-on-py3
avoid the conda/travis/pip/scipy mess with a simple skip
- Loading branch information
Showing
5 changed files
with
46 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
name: test_env | ||
dependencies: | ||
- python=3.4 | ||
- numpy | ||
- scipy | ||
- pandas | ||
- nose | ||
- pytz | ||
- ephem | ||
#- numba | ||
- numba | ||
- pip: | ||
- numpy | ||
- pandas | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
name: test_env | ||
dependencies: | ||
- python=3.5 | ||
- numpy | ||
- scipy | ||
- pandas | ||
- nose | ||
- pytz | ||
- ephem | ||
# - numba | ||
- numba | ||
- pip: | ||
- numpy | ||
- pandas | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# the has/skip patterns closely follow the examples set by | ||
# the xray/xarray project | ||
|
||
import sys | ||
import platform | ||
|
||
try: | ||
import unittest2 as unittest | ||
except ImportError: | ||
import unittest | ||
|
||
try: | ||
import scipy | ||
has_scipy = True | ||
except ImportError: | ||
has_scipy = False | ||
|
||
def requires_scipy(test): | ||
return test if has_scipy else unittest.skip('requires scipy')(test) | ||
|
||
def incompatible_conda_linux_py3(test): | ||
""" | ||
Test won't work in Python 3.x due to Anaconda issue. | ||
""" | ||
major = sys.version_info[0] | ||
minor = sys.version_info[1] | ||
system = platform.system() | ||
|
||
if major == 3 and system == 'Linux': | ||
out = unittest.skip('error on Linux Python 3 due to Anaconda')(test) | ||
else: | ||
out = test | ||
|
||
return out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters