mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Do not attempt 'import black' for Python 3.5
This commit is contained in:
parent
fcec3badd8
commit
9683aeb239
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import black
|
||||
from click.testing import CliRunner
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
|
|
@ -11,6 +10,9 @@ code_root = Path(__file__).parent.parent
|
|||
sys.version_info[:2] < (3, 6), reason="Black requires Python 3.6 or later"
|
||||
)
|
||||
def test_black():
|
||||
# Do not import at top of module because Python 3.5 will not have it installed
|
||||
import black
|
||||
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(
|
||||
black.main, [str(code_root / "tests"), str(code_root / "datasette"), "--check"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue