def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     from autotest.client.os_dep import COMMON_BIN_PATHS
     assert which("more") in (os.path.abspath(os.path.join(p, "more"))
                              for p in COMMON_BIN_PATHS)
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert which("more")
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert not which("more", extra_dirs=[])
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert os.path.abspath(os.path.join(os.sep, "nosuch", "more")) == \
         which("more", extra_dirs=[os.path.join(os.sep, "nosuch")])
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert os.path.join(os.getcwd(), "foo", "more") == which(
         os.path.join("foo", "more"))
示例#6
0
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     from autotest.client.os_dep import COMMON_BIN_PATHS
     assert which("more") in (os.path.abspath(os.path.join(p, "more"))
                              for p in COMMON_BIN_PATHS)
示例#7
0
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert not which("more", extra_dirs=[])
示例#8
0
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert which("more")
示例#9
0
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert os.path.join(os.getcwd(), "foo",
                         "more") == which(os.path.join("foo", "more"))
示例#10
0
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert os.path.abspath(os.path.join(os.sep, "nosuch", "more")) == \
         which("more", extra_dirs=[os.path.join(os.sep, "nosuch")])