samedi 6 février 2021

Test passes in Pycharm but fails in (mac) terminal

I have a simple test (test.sh), which checks whether the output returned by function.py and the expected output are the same:

python function.py\
    --input_file input_file.txt\
    --output_file output_file.txt;

if cmp -s output_file.txt expected_output.txt; then
    echo "Test: PASS";
else
    echo "Test: FAIL";
fi

When running test.sh from the Terminal in Pycharm, I get "Test: PASS", whereas from the mac terminal I get "Test: FAIL". Do you have any idea why is this happening?

Aucun commentaire:

Enregistrer un commentaire