-
Notifications
You must be signed in to change notification settings - Fork 33
Issue148 - 0
children regression in dash==0.40.0
#150
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -104,7 +104,7 @@ def request_queue_assertions( | |||
|
||||
if expected_length is not None: | ||||
self.assertEqual(len(request_queue), expected_length) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh noes, trailing whitespace courtesy of @chriddyp ??? 😅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no way!! 🙊 🙊 🙊 |
||||
|
||||
def test_initial_state(self): | ||||
app = Dash(__name__) | ||||
app.layout = html.Div([ | ||||
|
@@ -475,6 +475,32 @@ def test_initial_state(self): | |||
|
||||
assert_clean_console(self) | ||||
|
||||
def test_array_of_nully_child(self): | ||||
app = Dash(__name__) | ||||
app.layout = html.Div(id='nully-wrapper', children=[0]) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This worked and needs to keep working There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice. I'd call this falsy though, not nully. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good point |
||||
|
||||
self.startServer(app) | ||||
|
||||
self.wait_for_element_by_css_selector('#nully-wrapper') | ||||
wrapper = self.driver.find_element_by_id('nully-wrapper') | ||||
|
||||
self.assertEqual(wrapper.get_attribute('innerHTML'), '0') | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't this whole section just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hum.. wasn't aware of that one. Looks like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
dash-renderer/tests/test_render.py Line 63 in 2c0169c
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Embarrassing. I can't read code it seems. Will update to use suggested. |
||||
|
||||
assert_clean_console(self) | ||||
|
||||
def test_of_nully_child(self): | ||||
app = Dash(__name__) | ||||
app.layout = html.Div(id='nully-wrapper', children=0) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the regression case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. too late for the comment, but this should be merged with the |
||||
|
||||
self.startServer(app) | ||||
|
||||
self.wait_for_element_by_css_selector('#nully-wrapper') | ||||
wrapper = self.driver.find_element_by_id('nully-wrapper') | ||||
|
||||
self.assertEqual(wrapper.get_attribute('innerHTML'), '0') | ||||
|
||||
assert_clean_console(self) | ||||
|
||||
def test_simple_callback(self): | ||||
app = Dash(__name__) | ||||
app.layout = html.Div([ | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 is falsy..