Skip to content

Commit c11a4d9

Browse files
authored
Test that name and description can be set via constructor. (#826)
Alternative to #825, that adds tests for behavior. I don't think we _need_ the ability to set the value via a constructor, And I'm generally in favor of simplifying, but at least this should have tests.
1 parent d2fbecc commit c11a4d9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

traitlets/config/tests/test_application.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ def test_basic(self):
137137
self.assertEqual(app.classes, [MyApp, Bar, Foo]) # type:ignore
138138
self.assertEqual(app.config_file, "")
139139

140+
def test_app_name_set_via_constructor(self):
141+
app = MyApp(name='set_via_constructor')
142+
assert app.name == "set_via_constructor"
143+
140144
def test_mro_discovery(self):
141145
app = MyApp()
142146

0 commit comments

Comments
 (0)