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