Changeset 767a8ef
- Timestamp:
- May 18, 2022, 10:47:11 AM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- e6cf857f
- Parents:
- 9939dc3
- Location:
- tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/settings.py
r9939dc3 r767a8ef 201 201 global output_width 202 202 output_width = max(map(lambda t: len(t.target()), tests)) 203 # 35 is the maximum width of the name field before we get line wrapping. 204 output_width = min(output_width, 35) -
tests/pybin/test_run.py
r9939dc3 r767a8ef 43 43 return os.path.normpath( os.path.join(settings.BUILDDIR, self.path, self.name) ) 44 44 45 def format_target(self, width): 46 target = self.target() 47 length = len(target) 48 if length < width: 49 return '{0:{width}}'.format(target, width=width) 50 elif length == width: 51 return target 52 else: 53 return '...' + target[3-width:] 54 45 55 @staticmethod 46 56 def valid_name(name): -
tests/test.py
r9939dc3 r767a8ef 252 252 try : 253 253 # print formated name 254 name_txt = '{0:{width}} '.format(t.target(), width=settings.output_width)254 name_txt = t.format_target(width=settings.output_width) + ' ' 255 255 256 256 retcode, error, duration = run_single_test(t)
Note: See TracChangeset
for help on using the changeset viewer.