Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 126 for chdir (0.04 sec)

  1. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

    
    @pytest.fixture(scope="module", name="client")
    def get_client(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./sql_app.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  2. src/syscall/fs_js.go

    	n = copy(buf, cwd)
    	return
    }
    
    func Chdir(path string) (err error) {
    	if err := checkPath(path); err != nil {
    		return err
    	}
    	defer recoverErr(&err)
    	jsProcess.Call("chdir", path)
    	return
    }
    
    func Fchdir(fd int) error {
    	f, err := fdToFile(fd)
    	if err != nil {
    		return err
    	}
    	return Chdir(f.path)
    }
    
    func Readlink(path string, buf []byte) (n int, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 11 18:19:17 UTC 2023
    - 10.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_sql_databases/test_sql_databases.py

    from ...utils import needs_pydanticv1
    
    
    @pytest.fixture(scope="module")
    def client(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./sql_app.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py

    from ...utils import needs_py310, needs_pydanticv1
    
    
    @pytest.fixture(scope="module")
    def client(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./sql_app.db")
        if test_db.is_file():  # pragma: nocover
            test_db.unlink()
        # Import while creating the client to create the DB after starting the test session
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  5. src/os/exec/lp_windows_test.go

    		files:     []string{`p1\a.bat`, `p2\a.bat`},
    		PATH:      []string{`.\p1`, `p1`, `p2`},
    		searchFor: `a`,
    		want:      `p1\a.bat`,
    	},
    }
    
    func TestLookPathWindows(t *testing.T) {
    	// Not parallel: uses Chdir and Setenv.
    
    	// We are using the "printpath" command mode to test exec.Command here,
    	// so we won't be calling helperCommand to resolve it.
    	// That may cause it to appear to be unused.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:38:12 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  6. src/os/file.go

    		return err
    	}
    	return Chmod(name, fi.Mode()|ModeSticky)
    }
    
    // Chdir changes the current working directory to the named directory.
    // If there is an error, it will be of type *PathError.
    func Chdir(dir string) error {
    	if e := syscall.Chdir(dir); e != nil {
    		testlog.Open(dir) // observe likely non-existent directory
    		return &PathError{Op: "chdir", Path: dir, Err: e}
    	}
    	if runtime.GOOS == "windows" {
    		getwdCache.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:37 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  7. src/syscall/exec_windows.go

    	}
    
    	if len(attr.Dir) != 0 {
    		// StartProcess assumes that argv0 is relative to attr.Dir,
    		// because it implies Chdir(attr.Dir) before executing argv0.
    		// Windows CreateProcess assumes the opposite: it looks for
    		// argv0 relative to the current directory, and, only once the new
    		// process is started, it does Chdir(attr.Dir). We are adjusting
    		// for that difference here by making argv0 absolute.
    		var err error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 28 18:29:48 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  8. src/cmd/go/main.go

    //
    //  2. A toolchain switch later on reinvokes the new go command with the same arguments.
    //     The parent toolchain has already done the chdir; the child must not try to do it again.
    func handleChdirFlag() {
    	_, used := lookupCmd(os.Args[1:])
    	used++ // because of [1:]
    	if used >= len(os.Args) {
    		return
    	}
    
    	var dir string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:09:11 UTC 2024
    - 10K bytes
    - Viewed (0)
  9. src/path/filepath/path_windows_test.go

    		wd := replacer.Replace(test.wd)
    		arg := replacer.Replace(test.arg)
    		want := replacer.Replace(test.want)
    
    		if test.wd == "." {
    			err := os.Chdir(cwd)
    			if err != nil {
    				t.Error(err)
    
    				continue
    			}
    		} else {
    			err := os.Chdir(wd)
    			if err != nil {
    				t.Error(err)
    
    				continue
    			}
    		}
    		if arg != "" {
    			arg = filepath.Clean(arg)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 20:38:54 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testplugin/plugin_test.go

    	}
    
    	os.Setenv("GOPATH", filepath.Join(GOPATH, "alt"))
    	if err := os.Chdir(altRoot); err != nil {
    		log.Panic(err)
    	} else {
    		prettyPrintf("cd %s\n", altRoot)
    	}
    	os.Setenv("PWD", altRoot)
    	goCmd(nil, "build", "-buildmode=plugin", "-o", filepath.Join(modRoot, "plugin-mismatch.so"), "./plugin-mismatch")
    
    	os.Setenv("GOPATH", GOPATH)
    	if err := os.Chdir(modRoot); err != nil {
    		log.Panic(err)
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 12.3K bytes
    - Viewed (0)
Back to top