Skip to content

Conversation

@rmoehn
Copy link
Contributor

@rmoehn rmoehn commented Aug 21, 2018

For exercising Patchwork with random inputs.

Implementation notes:

  • I don't know if the code involving threading is correct.

  • Leave many TODOs, because doing them would good, but isn't crucial for
    the random test to be useful.

  • Some identifiers have a trailing underscore (hypothesis_) in order to
    avoid shadowing global variables.

  • One might think that starting a thread for every act() is slow, but on
    my machine, which is old, it increases the running time of the random
    test by only a few seconds (7 s → 8-12 s).

  • Someone in https://stackoverflow.com/questions/2829329/ advises to
    catch BaseException (instead of Exception) and re-raise in
    (Terminable)Thread.join. Don't do that, because a SystemExit in a
    child thread shouldn't terminate the parent, in my opinion.

  • Custom exception types are good. Cf.
    https://www.youtube.com/watch?v=wf-BqAjZb8M.

For exercising Patchwork with random inputs.

Implementation notes:

- I don't know if the code involving threading is correct.

- Leave many TODOs, because doing them would good, but isn't crucial for
  the random test to be useful.

- Some identifiers have a trailing underscore (hypothesis_) in order to
  avoid shadowing global variables.

- One might think that starting a thread for every act() is slow, but on
  my machine, which is old, it increases the running time of the random
  test by only a few seconds (7 s → 8-12 s).

- Someone in https://stackoverflow.com/questions/2829329/ advises to
  catch BaseException (instead of Exception) and re-raise in
  (Terminable)Thread.join. Don't do that, because a SystemExit in a
  child thread shouldn't terminate the parent, in my opinion.

- Custom exception types are good. Cf.
  https://www.youtube.com/watch?v=wf-BqAjZb8M.
@rmoehn rmoehn mentioned this pull request Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant