mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
Add some color to children-vs-codegen error (#583)
It took me some time to track down the root cause of `children` not matching codegen, having the error message directly hint that visit and codegen are probably mimatched (my visit was running out-of-order) will likely help newbies get going faster.
This commit is contained in:
parent
601db54880
commit
3578f2fc3d
1 changed files with 3 additions and 1 deletions
|
|
@ -137,7 +137,9 @@ class CSTNodeTest(UnitTest):
|
|||
codegen_children,
|
||||
msg=(
|
||||
"The list of children we got from `node.children` differs from the "
|
||||
+ "children that were visited by `node._codegen`."
|
||||
+ "children that were visited by `node._codegen`. This is probably "
|
||||
+ "due to a mismatch between _visit_and_replace_children and "
|
||||
+ "_codegen_impl."
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue