|
511 | 511 |
|
512 | 512 | # This is the expected output for the nested_folder tests. |
513 | 513 | # └── parametrize_tests.py |
514 | | -# └── test_adding |
515 | | -# └── [3+5-8] |
516 | | -# └── [2+4-6] |
517 | | -# └── [6+9-16] |
| 514 | +# └── TestClass |
| 515 | +# └── test_adding |
| 516 | +# └── [3+5-8] |
| 517 | +# └── [2+4-6] |
| 518 | +# └── [6+9-16] |
| 519 | +# └── test_string |
| 520 | +# └── [hello] |
| 521 | +# └── [complicated split [] ()] |
518 | 522 | parameterize_tests_path = TEST_DATA_PATH / "parametrize_tests.py" |
519 | 523 | parametrize_tests_expected_output = { |
520 | 524 | "name": ".data", |
|
528 | 532 | "id_": os.fspath(parameterize_tests_path), |
529 | 533 | "children": [ |
530 | 534 | { |
531 | | - "name": "test_adding", |
| 535 | + "name": "TestClass", |
532 | 536 | "path": os.fspath(parameterize_tests_path), |
533 | | - "type_": "function", |
534 | | - "id_": "parametrize_tests.py::test_adding", |
| 537 | + "type_": "class", |
| 538 | + "id_": "parametrize_tests.py::TestClass", |
535 | 539 | "children": [ |
536 | 540 | { |
537 | | - "name": "[3+5-8]", |
538 | | - "path": os.fspath(parameterize_tests_path), |
539 | | - "lineno": find_test_line_number( |
540 | | - "test_adding[3+5-8]", |
541 | | - parameterize_tests_path, |
542 | | - ), |
543 | | - "type_": "test", |
544 | | - "id_": get_absolute_test_id( |
545 | | - "parametrize_tests.py::test_adding[3+5-8]", |
546 | | - parameterize_tests_path, |
547 | | - ), |
548 | | - "runID": get_absolute_test_id( |
549 | | - "parametrize_tests.py::test_adding[3+5-8]", |
550 | | - parameterize_tests_path, |
551 | | - ), |
552 | | - }, |
553 | | - { |
554 | | - "name": "[2+4-6]", |
| 541 | + "name": "test_adding", |
555 | 542 | "path": os.fspath(parameterize_tests_path), |
556 | | - "lineno": find_test_line_number( |
557 | | - "test_adding[2+4-6]", |
558 | | - parameterize_tests_path, |
559 | | - ), |
560 | | - "type_": "test", |
561 | | - "id_": get_absolute_test_id( |
562 | | - "parametrize_tests.py::test_adding[2+4-6]", |
563 | | - parameterize_tests_path, |
564 | | - ), |
565 | | - "runID": get_absolute_test_id( |
566 | | - "parametrize_tests.py::test_adding[2+4-6]", |
567 | | - parameterize_tests_path, |
568 | | - ), |
569 | | - }, |
570 | | - { |
571 | | - "name": "[6+9-16]", |
572 | | - "path": os.fspath(parameterize_tests_path), |
573 | | - "lineno": find_test_line_number( |
574 | | - "test_adding[6+9-16]", |
575 | | - parameterize_tests_path, |
576 | | - ), |
577 | | - "type_": "test", |
578 | | - "id_": get_absolute_test_id( |
579 | | - "parametrize_tests.py::test_adding[6+9-16]", |
580 | | - parameterize_tests_path, |
581 | | - ), |
582 | | - "runID": get_absolute_test_id( |
583 | | - "parametrize_tests.py::test_adding[6+9-16]", |
584 | | - parameterize_tests_path, |
585 | | - ), |
| 543 | + "type_": "function", |
| 544 | + "id_": "parametrize_tests.py::TestClass::test_adding", |
| 545 | + "children": [ |
| 546 | + { |
| 547 | + "name": "[3+5-8]", |
| 548 | + "path": os.fspath(parameterize_tests_path), |
| 549 | + "lineno": find_test_line_number( |
| 550 | + "test_adding[3+5-8]", |
| 551 | + parameterize_tests_path, |
| 552 | + ), |
| 553 | + "type_": "test", |
| 554 | + "id_": get_absolute_test_id( |
| 555 | + "parametrize_tests.py::TestClass::test_adding[3+5-8]", |
| 556 | + parameterize_tests_path, |
| 557 | + ), |
| 558 | + "runID": get_absolute_test_id( |
| 559 | + "parametrize_tests.py::TestClass::test_adding[3+5-8]", |
| 560 | + parameterize_tests_path, |
| 561 | + ), |
| 562 | + }, |
| 563 | + { |
| 564 | + "name": "[2+4-6]", |
| 565 | + "path": os.fspath(parameterize_tests_path), |
| 566 | + "lineno": find_test_line_number( |
| 567 | + "test_adding[2+4-6]", |
| 568 | + parameterize_tests_path, |
| 569 | + ), |
| 570 | + "type_": "test", |
| 571 | + "id_": get_absolute_test_id( |
| 572 | + "parametrize_tests.py::TestClass::test_adding[2+4-6]", |
| 573 | + parameterize_tests_path, |
| 574 | + ), |
| 575 | + "runID": get_absolute_test_id( |
| 576 | + "parametrize_tests.py::TestClass::test_adding[2+4-6]", |
| 577 | + parameterize_tests_path, |
| 578 | + ), |
| 579 | + }, |
| 580 | + { |
| 581 | + "name": "[6+9-16]", |
| 582 | + "path": os.fspath(parameterize_tests_path), |
| 583 | + "lineno": find_test_line_number( |
| 584 | + "test_adding[6+9-16]", |
| 585 | + parameterize_tests_path, |
| 586 | + ), |
| 587 | + "type_": "test", |
| 588 | + "id_": get_absolute_test_id( |
| 589 | + "parametrize_tests.py::TestClass::test_adding[6+9-16]", |
| 590 | + parameterize_tests_path, |
| 591 | + ), |
| 592 | + "runID": get_absolute_test_id( |
| 593 | + "parametrize_tests.py::TestClass::test_adding[6+9-16]", |
| 594 | + parameterize_tests_path, |
| 595 | + ), |
| 596 | + }, |
| 597 | + ], |
586 | 598 | }, |
587 | 599 | ], |
588 | 600 | }, |
|
872 | 884 | "id_": os.fspath(tests_path), |
873 | 885 | } |
874 | 886 | TEST_MULTI_CLASS_NEST_PATH = TEST_DATA_PATH / "test_multi_class_nest.py" |
875 | | - |
| 887 | +# This is the expected output for the nested_classes tests. |
| 888 | +# └── test_multi_class_nest.py |
| 889 | +# └── TestFirstClass |
| 890 | +# └── TestSecondClass |
| 891 | +# └── test_second |
| 892 | +# └── test_first |
| 893 | +# └── TestSecondClass2 |
| 894 | +# └── test_second2 |
| 895 | +# └── test_independent |
876 | 896 | nested_classes_expected_test_output = { |
877 | 897 | "name": ".data", |
878 | 898 | "path": TEST_DATA_PATH_STR, |
|
984 | 1004 | SYMLINK_FOLDER_PATH_TESTS_TEST_A = TEST_DATA_PATH / "symlink_folder" / "tests" / "test_a.py" |
985 | 1005 | SYMLINK_FOLDER_PATH_TESTS_TEST_B = TEST_DATA_PATH / "symlink_folder" / "tests" / "test_b.py" |
986 | 1006 |
|
| 1007 | +# This is the expected output for the symlink_folder tests. |
| 1008 | +# └── symlink_folder |
| 1009 | +# └── tests |
| 1010 | +# └── test_a.py |
| 1011 | +# └── test_a_function |
| 1012 | +# └── test_b.py |
| 1013 | +# └── test_b_function |
987 | 1014 | symlink_expected_discovery_output = { |
988 | 1015 | "name": "symlink_folder", |
989 | 1016 | "path": str(SYMLINK_FOLDER_PATH), |
|
0 commit comments