浏览代码

Remove Python cache files before each Tox run.

Dan Helfman 6 年之前
父节点
当前提交
0b1e38e5f6
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      tox.ini

+ 5 - 1
tox.ini

@@ -7,9 +7,13 @@ minversion = 3.10.0
 [testenv]
 usedevelop = True
 deps = -rtest_requirements.txt
-whitelist_externals = sh
+whitelist_externals = 
+    find
+    sh
 install_command =
     sh scripts/pip {opts} {packages}
+commands_pre =
+    find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -path '*/__pycache__/*' -name '*.py[c|o]' -delete
 commands =
     pytest
     py36,py37: black --check .