From f3a106b5180aad806261a6523179da6e58dd60bb 2009-07-02 00:07:30 From: Brian Granger Date: 2009-07-02 00:07:30 Subject: [PATCH] FakeModule.py => core/fakemodule.py and updated tests and imports. --- diff --git a/IPython/Extensions/ipy_jot.py b/IPython/Extensions/ipy_jot.py index dd71967..26eb106 100644 --- a/IPython/Extensions/ipy_jot.py +++ b/IPython/Extensions/ipy_jot.py @@ -14,7 +14,7 @@ ip = IPython.ipapi.get() import pickleshare import inspect,pickle,os,sys,textwrap -from IPython.FakeModule import FakeModule +from IPython.core.fakemodule import FakeModule from IPython.ipstruct import Struct diff --git a/IPython/Extensions/pspersistence.py b/IPython/Extensions/pspersistence.py index 563308d..0088f13 100644 --- a/IPython/Extensions/pspersistence.py +++ b/IPython/Extensions/pspersistence.py @@ -12,7 +12,7 @@ ip = IPython.ipapi.get() import pickleshare import inspect,pickle,os,sys,textwrap -from IPython.FakeModule import FakeModule +from IPython.core.fakemodule import FakeModule def restore_aliases(self): ip = self.getapi() diff --git a/IPython/Magic.py b/IPython/Magic.py index 6de8d71..ab93cf5 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -45,7 +45,7 @@ except ImportError: import IPython from IPython import OInspect, wildcard from IPython.core import debugger -from IPython.FakeModule import FakeModule +from IPython.core.fakemodule import FakeModule from IPython.Itpl import Itpl, itpl, printpl,itplns from IPython.PyColorize import Parser from IPython.ipstruct import Struct diff --git a/IPython/FakeModule.py b/IPython/core/fakemodule.py similarity index 100% rename from IPython/FakeModule.py rename to IPython/core/fakemodule.py diff --git a/IPython/tests/test_fakemodule.py b/IPython/core/tests/test_fakemodule.py similarity index 92% rename from IPython/tests/test_fakemodule.py rename to IPython/core/tests/test_fakemodule.py index 6325439..c8f0b3d 100644 --- a/IPython/tests/test_fakemodule.py +++ b/IPython/core/tests/test_fakemodule.py @@ -3,7 +3,7 @@ import nose.tools as nt -from IPython.FakeModule import FakeModule, init_fakemod_dict +from IPython.core.fakemodule import FakeModule, init_fakemod_dict # Make a fakemod and check a few properties def test_mk_fakemod(): diff --git a/IPython/core/tests/test_imports.py b/IPython/core/tests/test_imports.py index dbe047a..82cd739 100644 --- a/IPython/core/tests/test_imports.py +++ b/IPython/core/tests/test_imports.py @@ -8,4 +8,8 @@ def test_import_crashhandler(): from IPython.core import crashhandler def test_import_debugger(): - from IPython.core import debugger \ No newline at end of file + from IPython.core import debugger + +def test_import_fakemodule(): + from IPython.core import fakemodule + diff --git a/IPython/iplib.py b/IPython/iplib.py index 3d807c6..ce95008 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -48,7 +48,7 @@ import tempfile from IPython import OInspect,PyColorize,ultraTB from IPython.core import debugger from IPython.Extensions import pickleshare -from IPython.FakeModule import FakeModule, init_fakemod_dict +from IPython.core.fakemodule import FakeModule, init_fakemod_dict from IPython.Itpl import ItplNS from IPython.Logger import Logger from IPython.Magic import Magic diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 340e1aa..12d122a 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -200,7 +200,7 @@ def make_runners(): top_mod = \ ['backgroundjobs.py', 'coloransi.py', 'completer.py', 'configloader.py', 'crashhandler.py', 'debugger.py', 'deepreload.py', 'demo.py', - 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', + 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'fakemodule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', 'Logger.py', 'macro.py', 'Magic.py', 'OInspect.py', diff --git a/docs/source/development/reorg.txt b/docs/source/development/reorg.txt index 197db64..4a372e2 100644 --- a/docs/source/development/reorg.txt +++ b/docs/source/development/reorg.txt @@ -105,15 +105,14 @@ Where things will be moved * :file:`DPyGetOpt.py`. Move to :mod:`IPython.utils` and replace with newer options parser. -* :file:`dtutils.py`. Remove or move to :file:`IPython.testing` or - :file:`IPython.lib`. +* :file:`dtutils.py`. Move to :file:`IPython.deathrow`. +* :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`. * :file:`Extensions`. This needs to be gone through separately. Minimally, the package should be renamed to :file:`extensions`. -* :file:`FakeModule.py`. Move to :file:`IPython/core/fakemodule.py`. * :file:`Gnuplot2.py`. Move to :file:`IPython.sandbox`.