def test_compiler_args_deps(self):
    self._create_fake_thrifty_tool()
    upstream = self.make_target('src/thrifty:upstream', JavaThriftyLibrary, sources=['upstream.thrift'])
    downstream = self.make_target('src/thrifty:downstream', JavaThriftyLibrary, sources=['downstream.thrift'], dependencies=[upstream])
    context = self.context(target_roots=[upstream, downstream])
    task = self.create_task(context)
    self.assertEqual(['--out={}'.format(self.TARGET_WORKDIR), '--path={}/src/thrifty'.format(self.build_root), 'src/thrifty/downstream.thrift'], task.format_args_for_target(downstream, self.TARGET_WORKDIR))
def test_compiler_args_deps(self):
    self._create_fake_thrifty_tool()
    upstream = self.make_target('src/thrifty:upstream', JavaThriftyLibrary, sources=['upstream.thrift'])
    downstream = self.make_target('src/thrifty:downstream', JavaThriftyLibrary, sources=['downstream.thrift'], dependencies=[upstream])
    context = self.context(target_roots=[upstream, downstream])
    task = self.create_task(context)
    self.assertEqual(['--out={}'.format(self.TARGET_WORKDIR), '--path={}/src/thrifty'.format(self.build_root), 'src/thrifty/downstream.thrift'], task.format_args_for_target(downstream, self.TARGET_WORKDIR))