From 49915b40e532d7e930f4a982595823b57e152c1e 2008-08-17 22:43:19 From: Brian Granger Date: 2008-08-17 22:43:19 Subject: [PATCH] Added tests for the new get_ipython_dir and get_security_dir functions in genutils.py. Also added one for get_home_dir. --- diff --git a/IPython/tests/__init__.py b/IPython/tests/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/IPython/tests/__init__.py diff --git a/IPython/tests/test_genutils.py b/IPython/tests/test_genutils.py new file mode 100644 index 0000000..9072ec1 --- /dev/null +++ b/IPython/tests/test_genutils.py @@ -0,0 +1,32 @@ +# encoding: utf-8 + +"""Tests for genutils.py""" + +__docformat__ = "restructuredtext en" + +#----------------------------------------------------------------------------- +# Copyright (C) 2008 The IPython Development Team +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#----------------------------------------------------------------------------- + +#----------------------------------------------------------------------------- +# Imports +#----------------------------------------------------------------------------- + +from IPython import genutils + + +def test_get_home_dir(): + """Make sure we can get the home directory.""" + home_dir = genutils.get_home_dir() + +def test_get_ipython_dir(): + """Make sure we can get the ipython directory.""" + ipdir = genutils.get_ipython_dir() + +def test_get_security_dir(): + """Make sure we can get the ipython/security directory.""" + sdir = genutils.get_security_dir() + \ No newline at end of file diff --git a/setupbase.py b/setupbase.py index 28d8017..cd75644 100644 --- a/setupbase.py +++ b/setupbase.py @@ -115,6 +115,7 @@ def find_packages(): add_package(packages, 'kernel', config=True, tests=True, scripts=True) add_package(packages, 'kernel.core', config=True, tests=True) add_package(packages, 'testing', tests=True) + add_package(packages, 'tests') add_package(packages, 'testing.plugin', tests=False) add_package(packages, 'tools', tests=True) add_package(packages, 'UserConfig')