コード例 #1
0
ファイル: diff.py プロジェクト: Syerram/FunkLoad
 def __init__(self, report_dir1, report_dir2):
     # Swap windows path separator backslashes for forward slashes
     # Windows accepts '/' but some file formats like rest treat the
     # backslash specially.
     self.report1 = os.path.abspath(os.path.join(report_dir1, 'index.rst')).replace('\\', '/')
     self.report2 = os.path.abspath(os.path.join(report_dir2, 'index.rst')).replace('\\', '/')
     self.header = None
     self.data1 = extract_report_data(self.report1)
     self.data2 = extract_report_data(self.report2)
     self.comparable_keys = set(self.data1.keys()) & set(self.data2.keys())
コード例 #2
0
ファイル: trend.py プロジェクト: Syerram/FunkLoad
 def __init__(self, args):
     # Swap windows path separator backslashes for forward slashes
     # Windows accepts '/' but some file formats like rest treat the
     # backslash specially.
     self.args = [os.path.abspath(arg).replace('\\', '/') for arg in args]
     self.reports_metadata = [extract_metadata(report) for report in self.args]
     self.reports_name = [os.path.basename(report) for report in self.args]
     self.reports_data = [extract_report_data(os.path.join(report, 'index.rst')) for report in self.args]
     
     self.comparable_keys = None
     for data in self.reports_data:
         if self.comparable_keys is None:
             self.comparable_keys = set(data.keys())
         else:
             self.comparable_keys = self.comparable_keys.intersection(set(data.keys()))