mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375 Approved by: https://github.com/malfet
25 lines
697 B
Python
25 lines
697 B
Python
import os
|
|
import unittest
|
|
|
|
from tools.stats.upload_test_stats import get_tests, summarize_test_cases
|
|
|
|
|
|
IN_CI = os.environ.get("CI")
|
|
|
|
|
|
class TestUploadTestStats(unittest.TestCase):
|
|
@unittest.skipIf(
|
|
IN_CI,
|
|
"don't run in CI as this does a lot of network calls and uses up GH API rate limit",
|
|
)
|
|
def test_existing_job(self) -> None:
|
|
"""Run on a known-good job and make sure we don't error and get basically okay results."""
|
|
test_cases = get_tests(2561394934, 1)
|
|
self.assertEqual(len(test_cases), 609873)
|
|
summary = summarize_test_cases(test_cases)
|
|
self.assertEqual(len(summary), 5068)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|