linz / lds-metadata-updater

For downloading, editing and then setting LDS metadata
0 stars 2 forks source link

CI tests appear to be passing but they are NOT #33

Closed SPlanzer closed 2 years ago

SPlanzer commented 3 years ago

While removing codecov (as per #30) I have noticed CI is passing even though python unittests are failing.

I do not suspect the task of removing codecov to cause the unit tests to fail.

image.

This must be an issue of the wrong exit code being return and perhaps something such as the below would resolve the issue. see here for more

from unittest import TestLoader, TextTestRunner

if __name__ == "__main__":
    loader = TestLoader()
    tests = loader.discover('.')
    testRunner = TextTestRunner()
    test_results = testRunner.run(tests)

    if test_results.wasSuccessful(): 
        exit(0)
    else:
        exit(1)