@@ -461,11 +461,14 @@ def test_set_xtype_bad():
461
461
# C2: user provides a z-scan file, expect to estimate through the file
462
462
(["--z-scan-file" , "test_dir/testfile.xy" ], 3 ),
463
463
# 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
465
466
(["--theoretical-from-density" , "ZrO2,17.45,1.2" ], 1.49 ),
467
+ (["--theoretical-from-density" , "ZrO2, 17.45, 1.2" ], 1.49 ),
466
468
# C4: user specifies sample composition, energy, and packing fraction
467
- # expect to estimate theoretically
469
+ # both with and without whitespaces, expect to estimate theoretically
468
470
# (["--theoretical-from-packing", "ZrO2,17.45,0.3"], 1.49),
471
+ # (["--theoretical-from-packing", "ZrO2, 17.45, 0.3"], 1.49),
469
472
],
470
473
)
471
474
def test_set_mud (user_filesystem , inputs , expected_mud ):
@@ -489,7 +492,8 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
489
492
"Cannot find invalid file. Please specify a valid file path." ,
490
493
],
491
494
),
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
493
497
# expect ValueError with a message indicating the correct format
494
498
(
495
499
["--theoretical-from-density" , "ZrO2,0.5" ],
@@ -498,10 +502,11 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
498
502
"Invalid mu*D input 'ZrO2,0.5'. "
499
503
"Expected format is 'sample composition, energy, "
500
504
"sample mass density or packing fraction' "
501
- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
505
+ "(e.g., 'ZrO2,20 ,0.8')." ,
502
506
],
503
507
),
504
- # C2.1: user provides fewer than three input values
508
+ # C2.2: (packing fraction option)
509
+ # user provides fewer than three input values
505
510
# expect ValueError with a message indicating the correct format
506
511
(
507
512
["--theoretical-from-packing" , "ZrO2,0.5" ],
@@ -510,10 +515,11 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
510
515
"Invalid mu*D input 'ZrO2,0.5'. "
511
516
"Expected format is 'sample composition, energy, "
512
517
"sample mass density or packing fraction' "
513
- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
518
+ "(e.g., 'ZrO2,20 ,0.8')." ,
514
519
],
515
520
),
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
517
523
# expect ValueError with a message indicating the correct format
518
524
(
519
525
["--theoretical-from-density" , "ZrO2,1.5,1.5,0.5" ],
@@ -522,10 +528,11 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
522
528
"Invalid mu*D input 'ZrO2,1.5,1.5,0.5'. "
523
529
"Expected format is 'sample composition, energy, "
524
530
"sample mass density or packing fraction' "
525
- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
531
+ "(e.g., 'ZrO2,20 ,0.8')." ,
526
532
],
527
533
),
528
- # C3.2: user provides more than 3 input values
534
+ # C3.2: (packing fraction option)
535
+ # user provides more than 3 input values
529
536
# expect ValueError with a message indicating the correct format
530
537
(
531
538
["--theoretical-from-packing" , "ZrO2,1.5,1.5,0.5" ],
@@ -534,7 +541,7 @@ def test_set_mud(user_filesystem, inputs, expected_mud):
534
541
"Invalid mu*D input 'ZrO2,1.5,1.5,0.5'. "
535
542
"Expected format is 'sample composition, energy, "
536
543
"sample mass density or packing fraction' "
537
- "with no whitespaces (e.g., 'ZrO2,2 ,0.8')." ,
544
+ "(e.g., 'ZrO2,20 ,0.8')." ,
538
545
],
539
546
),
540
547
],
0 commit comments