summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pre-commit-config.yaml7
-rw-r--r--tests/README.md10
-rw-r--r--tests/requirements.txt1
-rw-r--r--tox.ini2
4 files changed, 19 insertions, 1 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..36bc140
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,7 @@
+repos:
+- repo: https://github.com/python/black
+ rev: stable
+ hooks:
+ - id: black
+ language_version: python3.6
+ line_length: 88
diff --git a/tests/README.md b/tests/README.md
new file mode 100644
index 0000000..87b8195
--- /dev/null
+++ b/tests/README.md
@@ -0,0 +1,10 @@
+## Development
+
+After forking the pyparsing repo, and cloning your fork locally, install the libraries needed to run tests
+
+ pip install -r tests/requirements.txt
+ pre-commit install
+
+Run the tests to ensure your environment is setup
+
+ python -m unittest discover tests
diff --git a/tests/requirements.txt b/tests/requirements.txt
index c765658..6711199 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -1,2 +1,3 @@
coverage==4.4.2
tox==3.5.2
+pre-commit
diff --git a/tox.ini b/tox.ini
index 4367fed..5bf8404 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,4 +10,4 @@ commands=
[testenv:black]
deps = black
-commands = {envbindir}/black --target-version py35 --check --diff .
+commands = {envbindir}/black --target-version py35 --line-length 88 --check --diff .