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

        with fakeout() as b:
            try:
                rosdep_main(['check', 'python_dep']+cmd_extras)
            except SystemExit:
                assert False, "system exit occurred: %s\n%s"%(b[0].getvalue(), b[1].getvalue())

            stdout, stderr = b
            assert stdout.getvalue().strip() == "All system dependencies have been satisified", stdout.getvalue()
            assert not stderr.getvalue(), stderr.getvalue()
        try:
            osd = rospkg.os_detect.OsDetect()
            override = "%s:%s"%(osd.get_name(), osd.get_codename())
            with fakeout() as b:
                rosdep_main(['check', 'python_dep', '--os', override]+cmd_extras)
                stdout, stderr = b
                assert stdout.getvalue().strip() == "All system dependencies have been satisified"
                assert not stderr.getvalue(), stderr.getvalue()
        except SystemExit:
            assert False, "system exit occurred"

        # this used to abort, but now rosdep assumes validity for even empty stack args
        try:
            with fakeout() as b:
                rosdep_main(['check', 'packageless']+cmd_extras)
                stdout, stderr = b
                assert stdout.getvalue().strip() == "All system dependencies have been satisified"
                assert not stderr.getvalue(), stderr.getvalue()
        except SystemExit:
            assert False, "system exit occurred"

        try:
            rosdep_main(['check', 'nonexistent']+cmd_extras)
            assert False, "system exit should have occurred"
        except __HOLE__:
            pass
dataset/ETHPy150Open ros-infrastructure/rosdep/test/test_rosdep_main.py/TestRosdepMain.test_check