2023-04-11 17:53:42 +00:00
|
|
|
import unittest
|
2023-04-15 15:10:42 +00:00
|
|
|
import coverage
|
2023-04-11 17:53:42 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2023-04-15 15:10:42 +00:00
|
|
|
# Start coverage collection
|
|
|
|
cov = coverage.Coverage()
|
|
|
|
cov.start()
|
|
|
|
|
2023-04-14 16:28:58 +00:00
|
|
|
# Load all tests from the 'autogpt/tests' package
|
2023-04-15 15:10:42 +00:00
|
|
|
suite = unittest.defaultTestLoader.discover("./tests")
|
2023-04-12 19:15:00 +00:00
|
|
|
|
2023-04-11 17:53:42 +00:00
|
|
|
# Run the tests
|
|
|
|
unittest.TextTestRunner().run(suite)
|
2023-04-15 15:10:42 +00:00
|
|
|
|
|
|
|
# Stop coverage collection
|
|
|
|
cov.stop()
|
|
|
|
cov.save()
|
|
|
|
|
|
|
|
# Report the coverage
|
|
|
|
cov.report(show_missing=True)
|