Yelp/mrjob — pull request #466 by irskep (2012-05-31 01:43:25+00:00)
Title: Make tests twice as fast using mock

This branch introduces a dependency on the `mock` library and another change which take the test suite running time from 64 seconds to 30 seconds.

1. Mock `time.sleep()`, `MRJobRunner._create_mrjob_tar_gz()`, `EMRJobRunner._wait_for_s3_eventual_consistency()`, and `EMRJobRunner._wait_for_job_flow_termination()` in `test_emr` for ~20 second speedup

2. `MRJobRunner.make_runner()` sets the `_steps` attribute of the runner it creates so that the runner doesn't need to make a subprocess to get the job's steps. The machinery for getting a job's steps is completely internal and does not expose any APIs that could break as a result of this change. This is an optimization that we have complete control over. It could also be implemented by adding a keyword arg to `MRJobRunner.__init__()`.