Przeglądaj źródła

Remove all configuration from Tox file

This puts tool configuration in their familiar and standard
locations and simplifies the Tox configuration to just laying
out the environments and factors.

This also allows users who do not want to deal with overhead of Tox (for
whatever reasons ...) to run pytest/black/etc. and have the same
behaviour.
Luke Murphy 6 lat temu
rodzic
commit
20b8b45aeb
3 zmienionych plików z 14 dodań i 8 usunięć
  1. 3 0
      pyproject.toml
  2. 8 0
      setup.cfg
  3. 3 8
      tox.ini

+ 3 - 0
pyproject.toml

@@ -0,0 +1,3 @@
+[tool.black]
+line-length = 100
+skip-string-normalization = true

+ 8 - 0
setup.cfg

@@ -1,2 +1,10 @@
 [metadata]
 [metadata]
 description-file=README.md
 description-file=README.md
+
+[tool:pytest]
+testpaths = tests
+addopts = --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end
+
+[flake8]
+ignore = E501,W503
+exclude = *.*/*

+ 3 - 8
tox.ini

@@ -8,21 +8,16 @@ usedevelop = True
 deps = -rtest_requirements.txt
 deps = -rtest_requirements.txt
 whitelist_externals = sh
 whitelist_externals = sh
 commands =
 commands =
-    py.test --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end \
-        tests []
+    pytest
     sh scripts/black
     sh scripts/black
     flake8 .
     flake8 .
 
 
 [testenv:black]
 [testenv:black]
 basepython = python3.7
 basepython = python3.7
 commands =
 commands =
-    black --skip-string-normalization --line-length 100 .
+    black .
 
 
 [testenv:end-to-end]
 [testenv:end-to-end]
 deps = -rtest_requirements.txt
 deps = -rtest_requirements.txt
 commands =
 commands =
-    py.test tests/end-to-end []
-
-[flake8]
-ignore = E501,W503
-exclude = *.*/*
+    pytest tests/end-to-end