@@ -461,11 +461,14 @@ def test_set_xtype_bad():
461461 # C2: user provides a z-scan file, expect to estimate through the file
462462 (["--z-scan-file" , "test_dir/testfile.xy" ], 3 ),
463463 # C3: user specifies sample composition, energy,
464- # and sample mass density, expect to estimate theoretically
464+ # and sample mass density,
465+ # both with and without whitespaces, expect to estimate theoretically
465466 (["--theoretical-from-density" , "ZrO2,17.45,1.2" ], 1.49 ),
467+ (["--theoretical-from-density" , "ZrO2, 17.45, 1.2" ], 1.49 ),
466468 # C4: user specifies sample composition, energy, and packing fraction
467- # expect to estimate theoretically
469+ # both with and without whitespaces, expect to estimate theoretically
468470 # (["--theoretical-from-packing", "ZrO2,17.45,0.3"], 1.49),
471+ # (["--theoretical-from-packing", "ZrO2, 17.45, 0.3"], 1.49),
469472 ],
470473)
471474def test_set_mud (user_filesystem , inputs , expected_mud ):
@@ -489,7 +492,8 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
489492 "Cannot find invalid file. Please specify a valid file path." ,
490493 ],
491494 ),
492- # C2.1: user provides fewer than three input values
495+ # C2.1: (sample mass density option)
496+ # user provides fewer than three input values
493497 # expect ValueError with a message indicating the correct format
494498 (
495499 ["--theoretical-from-density" , "ZrO2,0.5" ],
@@ -498,10 +502,11 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
498502 "Invalid mu*D input 'ZrO2,0.5'. "
499503 "Expected format is 'sample composition, energy, "
500504 "sample mass density or packing fraction' "
501- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
505+ "(e.g., 'ZrO2,20 ,0.8')." ,
502506 ],
503507 ),
504- # C2.1: user provides fewer than three input values
508+ # C2.2: (packing fraction option)
509+ # user provides fewer than three input values
505510 # expect ValueError with a message indicating the correct format
506511 (
507512 ["--theoretical-from-packing" , "ZrO2,0.5" ],
@@ -510,10 +515,11 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
510515 "Invalid mu*D input 'ZrO2,0.5'. "
511516 "Expected format is 'sample composition, energy, "
512517 "sample mass density or packing fraction' "
513- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
518+ "(e.g., 'ZrO2,20 ,0.8')." ,
514519 ],
515520 ),
516- # C3.1: user provides more than 3 input values
521+ # C3.1: (sample mass density option)
522+ # user provides more than 3 input values
517523 # expect ValueError with a message indicating the correct format
518524 (
519525 ["--theoretical-from-density" , "ZrO2,1.5,1.5,0.5" ],
@@ -522,10 +528,11 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
522528 "Invalid mu*D input 'ZrO2,1.5,1.5,0.5'. "
523529 "Expected format is 'sample composition, energy, "
524530 "sample mass density or packing fraction' "
525- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
531+ "(e.g., 'ZrO2,20 ,0.8')." ,
526532 ],
527533 ),
528- # C3.2: user provides more than 3 input values
534+ # C3.2: (packing fraction option)
535+ # user provides more than 3 input values
529536 # expect ValueError with a message indicating the correct format
530537 (
531538 ["--theoretical-from-packing" , "ZrO2,1.5,1.5,0.5" ],
@@ -534,7 +541,7 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
534541 "Invalid mu*D input 'ZrO2,1.5,1.5,0.5'. "
535542 "Expected format is 'sample composition, energy, "
536543 "sample mass density or packing fraction' "
537- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
544+ "(e.g., 'ZrO2,20 ,0.8')." ,
538545 ],
539546 ),
540547 ],
0 commit comments