Skip to content

Commit 4d606f6

Browse files
Add missing CSV dialect for tests. Fixes #268
1 parent 3afe91e commit 4d606f6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
* [imomaliev](https://github.com/imomaliev)
1515
* [psrb](https://github.com/psrb)
1616
* [WayneLambert](https://github.com/WayneLambert)
17+
* [alejandro-angulo](https://github.com/alejandro-angulo)
18+

pylint_django/tests/test_func.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
import csv
22
import os
33
import sys
44
import pytest
@@ -9,6 +9,13 @@
99
try:
1010
# pylint 2.5: test_functional has been moved to pylint.testutils
1111
from pylint.testutils import FunctionalTestFile, LintModuleTest
12+
13+
if "test" not in csv.list_dialects():
14+
class test_dialect(csv.excel):
15+
delimiter = ":"
16+
lineterminator = "\n"
17+
18+
csv.register_dialect("test", test_dialect)
1219
except (ImportError, AttributeError):
1320
# specify directly the directory containing test_functional.py
1421
test_functional_dir = os.getenv('PYLINT_TEST_FUNCTIONAL_DIR', '')

0 commit comments

Comments
 (0)