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