Skip to content

Commit

Permalink
Move flake8 import into test (#361)
Browse files Browse the repository at this point in the history
This will allow you to ignore the test using a label exclusion pattern
without the flake8 dependency present, i.e. `pytest -m 'not linter'`
  • Loading branch information
cottsay authored Mar 6, 2024
1 parent 1dd1ae9 commit 74d072f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
import os
import sys

from flake8.api.legacy import get_style_guide
import pytest


@pytest.mark.flake8
@pytest.mark.linter
def test_flake8():
from flake8.api.legacy import get_style_guide

# Configure flake8 using the .flake8 file in the root of this repository.
style_guide = get_style_guide()

Expand Down

0 comments on commit 74d072f

Please sign in to comment.