187f2dba326c2567cb16d983b7faebb84d717ee2,tests/command/test_chip_command.py,TestChipCommand,test_command_create,#TestChipCommand#,10

Before Change



class TestChipCommand(mk.MockMixin, unittest.TestCase):
    def test_command_create(self):
        task = rv.task.ChipClassificationConfig({})
        backend = rv.backend.KerasClassificationConfig("")
        with RVConfig.get_tmp_dir() as tmp_dir:
            cmd = rv.command.ChipCommandConfig.builder() \
                                              .with_task(task) \
                                              .with_backend(backend) \
                                              .with_train_scenes("") \
                                              .with_val_scenes("") \
                                              .with_root_uri(tmp_dir) \
                                              .build() \
                                              .create_command()
            self.assertTrue(cmd, rv.command.ChipCommand)

    def test_missing_config_task(self):
        with self.assertRaises(rv.ConfigError):

After Change



class TestChipCommand(mk.MockMixin, unittest.TestCase):
    def test_command_create(self):
        task = rv.TaskConfig.builder(mk.MOCK_TASK).build()
        backend = rv.BackendConfig.builder(mk.MOCK_BACKEND).build()
        with RVConfig.get_tmp_dir() as tmp_dir:
            cmd_conf = rv.command.ChipCommandConfig.builder() \
                                                   .with_task(task) \
                                                   .with_backend(backend) \
                                                   .with_train_scenes([]) \
                                                   .with_val_scenes([]) \
                                                   .with_root_uri(tmp_dir) \
                                                   .build()

            cmd_conf = rv.command.CommandConfig.from_proto(cmd_conf.to_proto())
            cmd = cmd_conf.create_command()

            self.assertTrue(cmd, rv.command.ChipCommand)

    def test_missing_config_task(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 26

Instances


Project Name: azavea/raster-vision
Commit Name: 187f2dba326c2567cb16d983b7faebb84d717ee2
Time: 2019-03-02
Author: rdemanuele@gmail.com
File Name: tests/command/test_chip_command.py
Class Name: TestChipCommand
Method Name: test_command_create


Project Name: azavea/raster-vision
Commit Name: 187f2dba326c2567cb16d983b7faebb84d717ee2
Time: 2019-03-02
Author: rdemanuele@gmail.com
File Name: tests/command/test_predict_command.py
Class Name: PredictCommand
Method Name: test_command_create


Project Name: azavea/raster-vision
Commit Name: 187f2dba326c2567cb16d983b7faebb84d717ee2
Time: 2019-03-02
Author: rdemanuele@gmail.com
File Name: tests/command/test_chip_command.py
Class Name: TestChipCommand
Method Name: test_command_create


Project Name: azavea/raster-vision
Commit Name: 187f2dba326c2567cb16d983b7faebb84d717ee2
Time: 2019-03-02
Author: rdemanuele@gmail.com
File Name: tests/command/test_eval_command.py
Class Name: TestEvalCommand
Method Name: test_command_create