-
Notifications
You must be signed in to change notification settings - Fork 27
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 #11 from JordanRushing/master
Create init for access to yann and modify test_import
- Loading branch information
Showing
2 changed files
with
38 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
""" | ||
__init__.py - provides access to the YANN module without requiring installation | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
current_dir = os.path.dirname(os.path.abspath(__file__)) | ||
sys.path.append(os.path.dirname(current_dir)) |
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,9 +1,29 @@ | ||
import imp | ||
|
||
class TestImports: | ||
def test_progressbar(self): assert imp.find_module('progressbar') | ||
def test_skdata(self): assert imp.find_module('skdata') | ||
def test_scipy(self): assert imp.find_module('scipy') | ||
def test_numpy(self): assert imp.find_module('numpy') | ||
def test_theano(self): assert imp.find_module('theano') | ||
def test_yann(self): assert imp.find_module('yann') | ||
""" | ||
test_imports.py - Unit tests for YANN toolbox required imports | ||
""" | ||
|
||
import imp | ||
import unittest | ||
|
||
|
||
class TestImports(unittest.TestCase): | ||
|
||
@unittest.skip("progressbar is a Python2 exclusive requirement") | ||
def test_progressbar(self): | ||
self.assertTrue(imp.find_module('progressbar')) | ||
|
||
@unittest.skip("skdata is an optional data import not a requirement") | ||
def test_skdata(self): | ||
self.assertTrue(imp.find_module('skdata')) | ||
|
||
def test_scipy(self): | ||
self.assertTrue(imp.find_module('scipy')) | ||
|
||
def test_numpy(self): | ||
self.assertTrue(imp.find_module('numpy')) | ||
|
||
def test_theano(self): | ||
self.assertTrue(imp.find_module('theano')) | ||
|
||
def test_yann(self): | ||
self.assertTrue(imp.find_module('yann')) |