Ejemplo n.º 1
0
    def test_no_steps(self):
        job = MRJob([])
        job.sandbox()

        # it's possible to make a runner with the base MRJob, but it has
        # no steps
        with job.make_runner() as runner:
            self.assertEqual(runner._steps, [])

            self.assertRaises(ValueError, runner.run)
Ejemplo n.º 2
0
    def test_no_steps(self):
        job = MRJob()
        job.sandbox()

        # it's possible to make a runner with the base MRJob, but it has
        # no steps
        with job.make_runner() as runner:
            self.assertEqual(runner._steps, [])

            self.assertRaises(ValueError, runner.run)
Ejemplo n.º 3
0
 def test_loose_mrjob_conf(self):
     job = MRJob()
     with mrjob_conf_patcher(self.LOOSE_MRJOB_CONF):
         with job.make_runner() as runner:
             self.assertEqual(runner._opts['strict_protocols'], False)
Ejemplo n.º 4
0
 def test_strict_mrjob_conf(self):
     job = MRJob()
     with mrjob_conf_patcher(self.STRICT_MRJOB_CONF):
         with job.make_runner() as runner:
             self.assertEqual(runner._opts['strict_protocols'], True)
Ejemplo n.º 5
0
 def test_default(self):
     job = MRJob()
     with job.make_runner() as runner:
         self.assertEqual(runner._opts['strict_protocols'], True)
Ejemplo n.º 6
0
 def test_loose_mrjob_conf(self):
     job = MRJob()
     with mrjob_conf_patcher(self.LOOSE_MRJOB_CONF):
         with job.make_runner() as runner:
             self.assertEqual(runner._opts['strict_protocols'], False)
Ejemplo n.º 7
0
 def test_strict_mrjob_conf(self):
     job = MRJob()
     with mrjob_conf_patcher(self.STRICT_MRJOB_CONF):
         with job.make_runner() as runner:
             self.assertEqual(runner._opts['strict_protocols'], True)
Ejemplo n.º 8
0
 def test_default(self):
     job = MRJob()
     with job.make_runner() as runner:
         self.assertEqual(runner._opts['strict_protocols'], True)