示例#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)
示例#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)
示例#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)
示例#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)
示例#5
0
 def test_default(self):
     job = MRJob()
     with job.make_runner() as runner:
         self.assertEqual(runner._opts['strict_protocols'], True)
示例#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)
示例#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)
示例#8
0
 def test_default(self):
     job = MRJob()
     with job.make_runner() as runner:
         self.assertEqual(runner._opts['strict_protocols'], True)