Skip to content

Commit 6f3aae4

Browse files
committed
Add doctests to build_arg_list
1 parent 7aa07a0 commit 6f3aae4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: pygmt/helpers/utils.py

+4
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ def build_arg_list(
375375
... )
376376
... )
377377
['f1.txt', 'f2.txt', '-A0', '-B', '--FORMAT_DATE_MAP=o dd', '->out.txt']
378+
>>> build_arg_list(dict(B="12ABāβ①②"))
379+
['-B12AB\\340@~\\142@~@%34%\\254@%%@%34%\\255@%%', '--PS_CHAR_ENCODING=ISO-8859-4']
380+
>>> build_arg_list(dict(B="12ABāβ①②"), confdict=dict(PS_CHAR_ENCODING="ISO-8859-5"))
381+
['-B12AB\\340@~\\142@~@%34%\\254@%%@%34%\\255@%%', '--PS_CHAR_ENCODING=ISO-8859-5']
378382
>>> print(build_arg_list(dict(R="1/2/3/4", J="X4i", watre=True)))
379383
Traceback (most recent call last):
380384
...

0 commit comments

Comments
 (0)