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"))
Esempio n. 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)
Esempio n. 7
0
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert not which("more", extra_dirs=[])
Esempio n. 8
0
 def _test(access_mock, isfile_mock):
     from autotest.client.os_dep import which
     assert which("more")
Esempio n. 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"))
Esempio n. 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")])