Show More
@@ -70,7 +70,7 b' class Application(SingletonConfigurable):' | |||
|
70 | 70 | |
|
71 | 71 | # The name of the application, will usually match the name of the command |
|
72 | 72 | # line application |
|
73 |
|
|
|
73 | name = Unicode(u'application') | |
|
74 | 74 | |
|
75 | 75 | # The description of the application that is printed at the beginning |
|
76 | 76 | # of the help. |
@@ -47,7 +47,7 b' class Bar(Configurable):' | |||
|
47 | 47 | |
|
48 | 48 | class MyApp(Application): |
|
49 | 49 | |
|
50 |
|
|
|
50 | name = Unicode(u'myapp') | |
|
51 | 51 | running = Bool(False, config=True, |
|
52 | 52 | help="Is the app running?") |
|
53 | 53 | classes = List([Bar, Foo]) |
@@ -71,7 +71,7 b' class TestApplication(TestCase):' | |||
|
71 | 71 | |
|
72 | 72 | def test_basic(self): |
|
73 | 73 | app = MyApp() |
|
74 |
self.assertEquals(app. |
|
|
74 | self.assertEquals(app.name, u'myapp') | |
|
75 | 75 | self.assertEquals(app.running, False) |
|
76 | 76 | self.assertEquals(app.classes, [MyApp,Bar,Foo]) |
|
77 | 77 | self.assertEquals(app.config_file, u'') |
@@ -43,7 +43,7 b' from IPython.utils.traitlets import Tuple, Unicode, Type' | |||
|
43 | 43 | |
|
44 | 44 | class BaseIPythonApplication(Application): |
|
45 | 45 | |
|
46 |
|
|
|
46 | name = Unicode(u'ipython') | |
|
47 | 47 | description = Unicode(u'IPython: an enhanced interactive Python shell.') |
|
48 | 48 | version = Unicode(release.version) |
|
49 | 49 | |
@@ -56,7 +56,7 b' class BaseIPythonApplication(Application):' | |||
|
56 | 56 | os.path.join(get_ipython_package_dir(), u'config', u'profile') |
|
57 | 57 | ) |
|
58 | 58 | |
|
59 | config_file_paths = Tuple(Unicode) | |
|
59 | config_file_paths = Tuple(Unicode, Unicode, Unicode) | |
|
60 | 60 | def _config_file_paths_default(self): |
|
61 | 61 | return (os.getcwdu(), self.ipython_dir, self.builtin_profile_dir) |
|
62 | 62 | |
@@ -125,7 +125,8 b' class BaseIPythonApplication(Application):' | |||
|
125 | 125 | self.log.warn("Config file not found, skipping: %s" % |
|
126 | 126 | self.config_file_name, exc_info=True) |
|
127 | 127 | except: |
|
128 |
|
|
|
128 | # For testing purposes. | |
|
129 | if not suppress_errors: | |
|
129 | 130 | raise |
|
130 | 131 | self.log.warn("Error loading config file: %s" % |
|
131 | 132 | self.config_file_name, exc_info=True) |
General Comments 0
You need to be logged in to leave comments.
Login now