forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: Handle
None
process states in build_call_graph
The process definition allows a None state but the build_call_graph utils function intended for a creating printable output of the call graph does crash in this case. A None state indicates some undefined behavior in the code, but the application should not fail because of the formatting of the output. This commit makes build_call_graph handle None states. Partial fix for aiidateam#6585.
- Loading branch information
1 parent
dd866ce
commit 41df926
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
########################################################################### | ||
# Copyright (c), The AiiDA team. All rights reserved. # | ||
# This file is part of the AiiDA code. # | ||
# # | ||
# The code is hosted on GitHub at https://github.com/aiidateam/aiida-core # | ||
# For further information on the license, see the LICENSE.txt file # | ||
# For further information please visit http://www.aiida.net # | ||
########################################################################### | ||
"""Tests for the :mod:`aiida.cmdline.utils.ascii_vis` module.""" | ||
|
||
from aiida.orm.nodes.process.process import ProcessNode | ||
|
||
|
||
def test_build_call_graph(): | ||
from aiida.cmdline.utils.ascii_vis import build_call_graph | ||
|
||
node = ProcessNode() | ||
|
||
call_graph = build_call_graph(node) | ||
assert call_graph == 'None<None> None' |