@@ -436,17 +436,10 @@ def test_check__simple_project_with_missing_deps__reports_undeclared(
436
436
"- 'requests' imported at:" ,
437
437
f" { str (tmp_path / 'code.py' )} :1" ,
438
438
]
439
- expect_logs = [
440
- f"INFO:fawltydeps.extract_imports:Finding Python files under { tmp_path } " ,
441
- f"INFO:fawltydeps.extract_imports:Parsing Python file { tmp_path } /code.py" ,
442
- "INFO:fawltydeps.packages:'pandas' was not resolved."
443
- " Assuming it can be imported as 'pandas'." ,
444
- ]
445
- output , errors , returncode = run_fawltydeps (
439
+ output , _errors , returncode = run_fawltydeps (
446
440
"--check" , "--detailed" , "-v" , f"--code={ tmp_path } " , f"--deps={ tmp_path } "
447
441
)
448
442
assert output .splitlines () == expect
449
- assert_unordered_equivalence (errors .splitlines (), expect_logs )
450
443
assert returncode == 3
451
444
452
445
@@ -463,19 +456,10 @@ def test_check__simple_project_with_extra_deps__reports_unused(
463
456
"- 'pandas' declared in:" ,
464
457
f" { tmp_path / 'requirements.txt' } " ,
465
458
]
466
- expect_logs = [
467
- f"INFO:fawltydeps.extract_imports:Finding Python files under { tmp_path } " ,
468
- f"INFO:fawltydeps.extract_imports:Parsing Python file { tmp_path } /code.py" ,
469
- "INFO:fawltydeps.packages:'requests' was not resolved."
470
- " Assuming it can be imported as 'requests'." ,
471
- "INFO:fawltydeps.packages:'pandas' was not resolved."
472
- " Assuming it can be imported as 'pandas'." ,
473
- ]
474
- output , errors , returncode = run_fawltydeps (
459
+ output , _errors , returncode = run_fawltydeps (
475
460
"--check" , "--detailed" , "-v" , f"--code={ tmp_path } " , f"--deps={ tmp_path } "
476
461
)
477
462
assert output .splitlines () == expect
478
- assert_unordered_equivalence (errors .splitlines (), expect_logs )
479
463
assert returncode == 4
480
464
481
465
@@ -496,17 +480,10 @@ def test_check__simple_project__can_report_both_undeclared_and_unused(
496
480
"- 'pandas' declared in:" ,
497
481
f" { tmp_path / 'requirements.txt' } " ,
498
482
]
499
- expect_logs = [
500
- f"INFO:fawltydeps.extract_imports:Finding Python files under { tmp_path } " ,
501
- f"INFO:fawltydeps.extract_imports:Parsing Python file { tmp_path } /code.py" ,
502
- "INFO:fawltydeps.packages:'pandas' was not resolved."
503
- " Assuming it can be imported as 'pandas'." ,
504
- ]
505
- output , errors , returncode = run_fawltydeps (
483
+ output , _errors , returncode = run_fawltydeps (
506
484
"--check" , "--detailed" , "-v" , f"--code={ tmp_path } " , f"--deps={ tmp_path } "
507
485
)
508
486
assert output .splitlines () == expect
509
- assert_unordered_equivalence (errors .splitlines (), expect_logs )
510
487
assert returncode == 3 # undeclared is more important than unused
511
488
512
489
@@ -527,13 +504,7 @@ def test_check__simple_project__summary_report_with_verbose_logging(
527
504
"" ,
528
505
VERBOSE_PROMPT ,
529
506
]
530
- expect_logs = [
531
- f"INFO:fawltydeps.extract_imports:Finding Python files under { tmp_path } " ,
532
- f"INFO:fawltydeps.extract_imports:Parsing Python file { tmp_path } /code.py" ,
533
- "INFO:fawltydeps.packages:'pandas' was not resolved."
534
- " Assuming it can be imported as 'pandas'." ,
535
- ]
536
- output , errors , returncode = run_fawltydeps (
507
+ output , _errors , returncode = run_fawltydeps (
537
508
"--check" ,
538
509
"--summary" ,
539
510
"--verbose" ,
@@ -542,7 +513,6 @@ def test_check__simple_project__summary_report_with_verbose_logging(
542
513
f"{ tmp_path } " ,
543
514
)
544
515
assert output .splitlines () == expect
545
- assert_unordered_equivalence (errors .splitlines (), expect_logs )
546
516
assert returncode == 3 # undeclared is more important than unused
547
517
548
518
@@ -636,13 +606,7 @@ def test_check_undeclared__simple_project__reports_only_undeclared(
636
606
"- 'requests' imported at:" ,
637
607
f" { str (tmp_path / 'code.py' )} :1" ,
638
608
]
639
- expect_logs = [
640
- f"INFO:fawltydeps.extract_imports:Finding Python files under { tmp_path } " ,
641
- f"INFO:fawltydeps.extract_imports:Parsing Python file { tmp_path } /code.py" ,
642
- "INFO:fawltydeps.packages:'pandas' was not resolved."
643
- " Assuming it can be imported as 'pandas'." ,
644
- ]
645
- output , errors , returncode = run_fawltydeps (
609
+ output , _errors , returncode = run_fawltydeps (
646
610
"--check-undeclared" ,
647
611
"--detailed" ,
648
612
"-v" ,
@@ -651,7 +615,6 @@ def test_check_undeclared__simple_project__reports_only_undeclared(
651
615
f"{ tmp_path } " ,
652
616
)
653
617
assert output .splitlines () == expect
654
- assert_unordered_equivalence (errors .splitlines (), expect_logs )
655
618
assert returncode == 3
656
619
657
620
@@ -668,13 +631,7 @@ def test_check_unused__simple_project__reports_only_unused(
668
631
"- 'pandas' declared in:" ,
669
632
f" { tmp_path / 'requirements.txt' } " ,
670
633
]
671
- expect_logs = [
672
- f"INFO:fawltydeps.extract_imports:Finding Python files under { tmp_path } " ,
673
- f"INFO:fawltydeps.extract_imports:Parsing Python file { tmp_path } /code.py" ,
674
- "INFO:fawltydeps.packages:'pandas' was not resolved."
675
- " Assuming it can be imported as 'pandas'." ,
676
- ]
677
- output , errors , returncode = run_fawltydeps (
634
+ output , _errors , returncode = run_fawltydeps (
678
635
"--check-unused" ,
679
636
"--detailed" ,
680
637
"-v" ,
@@ -683,7 +640,6 @@ def test_check_unused__simple_project__reports_only_unused(
683
640
f"{ tmp_path } " ,
684
641
)
685
642
assert output .splitlines () == expect
686
- assert_unordered_equivalence (errors .splitlines (), expect_logs )
687
643
assert returncode == 4
688
644
689
645
0 commit comments