tests: Fix tests failing on Windows.

Tests were failing on Windows since paths are case-insensitive on it.
This uses pathlib library to compare paths on all platforms.

Fixes #651
This commit is contained in:
Ganesh Pawar 2021-03-02 14:22:12 +05:30 committed by Tim Abbott
parent 5f1590f12a
commit 44b6fd395a
8 changed files with 23 additions and 19 deletions

View file

@ -1,6 +1,7 @@
#! /usr/bin/env python3
import argparse
import sys
from zulint.command import add_default_linter_arguments, LinterConfig
@ -21,7 +22,7 @@ def run() -> None:
by_lang = linter_config.list_files(file_types=['py', 'sh', 'json', 'md', 'txt'],
exclude=EXCLUDED_FILES)
linter_config.external_linter('mypy', ['tools/run-mypy'], ['py'], pass_targets=False,
linter_config.external_linter('mypy', [sys.executable, 'tools/run-mypy'], ['py'], pass_targets=False,
description="Static type checker for Python (config: mypy.ini)")
linter_config.external_linter('flake8', ['flake8'], ['py'],
description="Standard Python linter (config: .flake8)")