Skip to content

Commit

Permalink
test(pre-commit): fix false positives
Browse files Browse the repository at this point in the history
The falsy return code was truthy when evaluated by Python.
  • Loading branch information
yajo committed Jan 4, 2022
1 parent 353cc17 commit 0ef7020
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
import platform
from pathlib import Path
from stat import S_IREAD

import pytest
from plumbum.cmd import git
from poethepoet.app import PoeThePoet

from copier.tools import TemporaryDirectory


@pytest.mark.skipif(
condition=platform.system() == "Windows",
reason="Windows does weird things with line endings.",
)
def test_lint():
"""Ensure source code formatting"""
PoeThePoet(Path("."))(["lint", "--show-diff-on-failure", "--color=always"])
result = PoeThePoet(Path("."))(["lint", "--show-diff-on-failure", "--color=always"])
assert result == 0


def test_types():
"""Ensure source code static typing."""
PoeThePoet(Path("."))(["types"])
result = PoeThePoet(Path("."))(["types"])
assert result == 0


def test_temporary_directory_with_readonly_files_deletion():
Expand Down

0 comments on commit 0ef7020

Please sign in to comment.