Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test detection of .git directory in a repo #73

Open
louieQ opened this issue Jan 25, 2022 · 0 comments
Open

Test detection of .git directory in a repo #73

louieQ opened this issue Jan 25, 2022 · 0 comments
Labels

Comments

@louieQ
Copy link
Collaborator

louieQ commented Jan 25, 2022

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
@louieQ louieQ added the testing label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant