예제 #1
0
 def setUp(self):
     self.task_data = [
         {
             'inputs': [
                 param_util.FileParam('IN',
                                      uri='gs://in/*',
                                      file_provider=PG)
             ]
         },
         {
             'outputs': [
                 param_util.FileParam('OUT',
                                      uri='gs://out/*',
                                      file_provider=PG)
             ]
         },
     ]
예제 #2
0
 def testFileParam(self):
     file_param = param_util.FileParam('my_name',
                                       'my_value',
                                       'my_docker_path',
                                       'my_remote_uri',
                                       recursive=True,
                                       file_provider=param_util.P_GCS)
     self.assertEqual('my_name', file_param.name)
     self.assertEqual('my_docker_path', file_param.docker_path)
     self.assertEqual('my_remote_uri', file_param.uri)
     self.assertTrue(file_param.recursive)
예제 #3
0
        ('glog', 'gs://bucket/my.log', 'gs://bucket/my.log', param_util.P_GCS),
    ])
    def test_logging_param_maker(self, unused_name, uri, expected_out,
                                 provider):
        del unused_name
        param = param_util.build_logging_param(
            uri, util_class=param_util.OutputFileParamUtil)
        self.assertEqual(param.uri, expected_out)
        self.assertEqual(param.file_provider, provider)


TASK_DATA = [
    {
        'inputs': [
            param_util.FileParam('IN',
                                 uri='gs://in/*',
                                 file_provider=param_util.P_GCS)
        ],
        'outputs': []
    },
    {
        'inputs': [],
        'outputs': [
            param_util.FileParam('OUT',
                                 uri='gs://out/*',
                                 file_provider=param_util.P_GCS)
        ]
    },
]