Skip to content

pylint complains about fs fixture name #612

Answered by mrbean-bremen
AustinScola asked this question in Q&A
Discussion options

You must be logged in to vote

Hm, fs is indeed a bit short, but it's also handy and it's quite clear that it stands for file system. I want to avoid polluting the fixture namespace with aliases that cannot be disabled, so I think the way to go here is to define your own fixture:

conftest.py

@pytest.fixture
def fake_filesystem(fs):  # pylint:disable=invalid-name
    yield fs

and use fake_filesystem everywhere else. We could add this as a default, but at the moment I'm more inclined not to do this.

@jmcgeheeiv - what do you think?

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by AustinScola
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #609 on June 10, 2021 15:18.