okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
2b36e8a02
main
1"""bench/results/README.md lists every result folder (tools/bench_results_index.py).""" 2import os 3import sys 4import unittest 5 6sys .path .insert (0 ,os .path .dirname (os .path .abspath (__file__ ))) 7import bench_results_index as bri # noqa: E402 8 9 10class BenchResultsIndex (unittest .TestCase ): 11def test_the_index_is_current_and_lists_every_folder (self ): 12have = open (bri .OUT ,encoding = "utf-8" ,newline = "" ).read ().replace ("\r\n" ,"\n" ) 13self .assertEqual (have ,bri .build (),"run python tools/bench_results_index.py" ) 14for name in os .listdir (bri .RESULTS ): 15if os .path .isdir (os .path .join (bri .RESULTS ,name )): 16self .assertIn ("[%s](%s/)" % (name ,name ),have ) 17 18 19if __name__ == "__main__" : 20unittest .main ()