Skip to content

Commit

Permalink
Merge pull request #11 from JordanRushing/master
Browse files Browse the repository at this point in the history
Create init for access to yann and modify test_import
  • Loading branch information
Ragav Venkatesan committed Feb 7, 2017
2 parents 91abe89 + 27f012e commit 688fae1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 9 deletions.
9 changes: 9 additions & 0 deletions tests/__init__.py
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))
38 changes: 29 additions & 9 deletions tests/test_imports.py
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'))

0 comments on commit 688fae1

Please sign in to comment.