def test_keys(self):
        sources_cache = get_cache_dir()
        cmd_extras = ['-c', sources_cache]

        try:
            with fakeout() as b:
                rosdep_main(['keys', 'rospack_fake']+cmd_extras)
                stdout, stderr = b
                assert stdout.getvalue().strip() == "testtinyxml", stdout.getvalue()
                assert not stderr.getvalue(), stderr.getvalue()
            with fakeout() as b:
                rosdep_main(['keys', 'rospack_fake', '--os', 'ubuntu:lucid', '--verbose']+cmd_extras)
                stdout, stderr = b
                assert stdout.getvalue().strip() == "testtinyxml", stdout.getvalue()
        except __HOLE__:
            assert False, "system exit occurred"
        try:
            rosdep_main(['keys', 'nonexistent']+cmd_extras)
            assert False, "system exit should have occurred"
        except SystemExit:
            pass
dataset/ETHPy150Open ros-infrastructure/rosdep/test/test_rosdep_main.py/TestRosdepMain.test_keys