Skip to content

Test detection of .git directory in a repo #73

@louieQ

Description

@louieQ

Concerning the recommendation of putting notebooks under version control, at present we detect the use of git.

However, we only have a test case for the absence of the .git directory in a repository.
I cannot find a way to put a dummy .git folder in one of the fixture repositories and have it versioned by git in the pynblint repo. I have tried to create a .git folder containing just an empty .touch file in pynblint/tests/fixtures/test_repo/DuplicatesNoUntitled, but it gets ignored even if I explicitly negate the corresponding path in .gitignore.

TODO: find a way to put a dummy .git directory under version control and add a positive case to the test function test_is_versioned.

@pytest.mark.parametrize("test_input,expected", [
    ("UntitledNoDuplicates", False)
])
def test_is_versioned(test_input, expected, repos):
    assert repos[test_input].versioned == expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions