SETI / rms-pds4indextools

PDS4 index tools Python module
Apache License 2.0
0 stars 0 forks source link

Add comments to unit tests clarifying the related executable command #19

Closed matthewtiscareno closed 3 days ago

matthewtiscareno commented 2 weeks ago

In order to make the unit tests more human-readable, please add some additional explanatory comments of each entry.

For example, the following currently occurs within :

            # Testing --limit-xpaths-file
            (
                str(expected_dir / 'limit_xpaths_file_success_1.txt'),
                'limit_xpaths_file.txt',
                [
                    str(test_files_dir),
                    str(labels_dir.name / Path('tester_label_1.xml')),
                    '--limit-xpaths-file',
                    str(samples_dir / 'element_1.txt'),
                    '--output-headers-file'
                ]
            ),

The suggestion here is to add the following as a second comment line, after # Testing --limit-xpaths-file:

            # Executable command: pds4_create_xml_index.py test_files test_files/labels/tester_label_1.xml --limit-xpaths-file test_files/samples/element_1.txt --output-headers-file
            # Compare result to golden copy: test_files/expected/limit_xpaths_file_success_1.txt

However, that's not quite right, because I just tried executing it and it didn't work. Please correct it and then use that.

matthewtiscareno commented 2 weeks ago

This can definitely wait until after Thursday's presentation.

rfrenchseti commented 2 weeks ago

The correct command is more like:

python pds4_create_xml_index.py ../test_files labels/tester_label_1.xml --limit-xpaths-file ../test_files/samples/element_1.txt --output-headers-file hdrout.txt

Note that the test infrastructure always adds on a filename at the end of the arguments for where the results should be placed.