Skip to content

Commit f63293f

Browse files
added more tests and refined help message
1 parent 542f65b commit f63293f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/diffpy/labpdfproc/labpdfprocapp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def get_args():
6565
nargs="+",
6666
help="Specify (multiple) key-value pairs to be loaded into metadata using the format key=value. "
6767
"Please separate each pair with whitespace, and make sure no whitespaces before or after the = sign. "
68-
"Please avoid putting = in a key. If you repeat key names, it will replace previous values. "
68+
"Avoid using = in keys. If multiple = signs are present, only the first one separates the key and value. "
69+
"If you repeat key names, it will replace previous values. "
6970
"If a key or value contains whitespace, enclose it in quotes. "
7071
'For example, you can specify -u "facility=NSLS II" beamline=28ID-2 "favorite color"=blue',
7172
)

src/diffpy/labpdfproc/tests/test_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def test_set_wavelength_bad(inputs, msg):
8585
[["facility=NSLS II", "beamline=28ID-2", "favorite color=blue"]],
8686
[["facility", "NSLS II"], ["beamline", "28ID-2"], ["favorite color", "blue"]],
8787
),
88+
([["facility=NSLS II", "facility=NSLS III"]], [["facility", "NSLS III"]]),
89+
([["x=y=z"]], [["x", "y=z"]]),
8890
]
8991

9092

0 commit comments

Comments
 (0)