GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — review · gitpython-developers/GitPython@afbbabf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tests/fixtures
    • assure-directory.sh
  • test
    • test_assure_directory.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/test_assure_directory.py‎

Copy file name to clipboardExpand all lines: test/test_assure_directory.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@pytest.fixture
1010
def directory_fixture(monkeypatch):
11-
with writable_fixture("assure-directory.sh") as temporary:
11+
with writable_fixture("empty.sh") as temporary:
1212
directory = temporary.path().resolve()
1313
with monkeypatch.context() as context:
1414
context.chdir(directory)
@@ -32,11 +32,13 @@ def test_nested_file_creates_only_missing_parent_directories(directory_fixture,
3232

3333
@pytest.mark.parametrize("path_type", [str, Path])
3434
def test_existing_directory_is_unchanged(directory_fixture, path_type):
35+
(directory_fixture / "existing").mkdir()
3536
assert assure_directory_exists(path_type("existing")) is False
3637

3738

3839
@pytest.mark.parametrize("path_type", [str, Path])
3940
def test_file_cannot_be_used_as_parent_directory(directory_fixture, path_type):
41+
(directory_fixture / "blocked").write_text("occupied\n")
4042
with pytest.raises(FileExistsError):
4143
assure_directory_exists(path_type("blocked/notes.txt"), is_file=True)
4244
assert (directory_fixture / "blocked").read_text() == "occupied\n"
Collapse file

‎tests/fixtures/assure-directory.sh‎

Copy file name to clipboardExpand all lines: tests/fixtures/assure-directory.sh
-4Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.