Changeset 35a408b7 for tests/pybin
- Timestamp:
- Jun 26, 2019, 1:51:28 PM (4 years ago)
- Branches:
- arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b0ab7853, e507c11
- Parents:
- 05c34c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/tools.py
r05c34c3 r35a408b7 179 179 os.chdir(cwd) 180 180 181 def killgroup(): 182 try: 183 os.killpg(os.getpgrp(), signal.SIGINT) 184 except KeyboardInterrupt: 185 pass # expected 186 except Exception as exc: 187 print("Unexpected exception", file=sys.stderr) 188 print(exc, file=sys.stderr) 189 sys.stderr.flush() 190 sys.exit(2) 191 181 192 ################################################################################ 182 193 # file handling … … 301 312 self.end = time.time() 302 313 self.duration = self.end - self.start 314 315 def timed(src, timeout): 316 expire = time.time() + timeout 317 i = iter(src) 318 while True: 319 yield i.next(max(expire - time.time(), 0))
Note: See TracChangeset
for help on using the changeset viewer.