diff --git a/.travis.yml b/.travis.yml index 1173e59..1390545 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ language: python python: - "3.6" +sudo: required + +before_install: + - curl -LO https://github.com/BurntSushi/ripgrep/releases/download/0.8.1/ripgrep_0.8.1_amd64.deb + - sudo dpkg -i ripgrep_0.8.1_amd64.deb install: - make install script: - - make doctest coverage black + - make black check_conftest_imports doctest coverage diff --git a/Makefile b/Makefile index 3ec8573..f8713d3 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,10 @@ ifeq ($(VIRTUAL_ENV),) $(error "Run pytest-services from a virtualenv (try 'make install && source venv/bin/activate')") endif +check_conftest_imports: + # refs: https://github.com/mozilla-services/pytest-services/issues/119 + rg '^import\s+conftest|^from\s+conftest\s+import\s+pytest' -g '*.py'; [ $$? -eq 1 ] + clean: clean-cache clean-python rm -rf venv # remember to deactivate your active virtual env @@ -64,6 +68,7 @@ venv: .PHONY: all \ check_venv \ + check_conftest_imports \ clean \ clean-cache \ clean-python \