tests: avoid putting build products into source directory (#2353)
* tests: keep source dir clean
* ci: make first build inplace
* ci: drop dev setting (wasn't doing anything)
* tests: warn if source directory is dirty
diff --git a/tests/conftest.py b/tests/conftest.py
index 8b6e47d..a2350d0 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -13,6 +13,8 @@
import pytest
+import env
+
# Early diagnostic for failed imports
import pybind11_tests # noqa: F401
@@ -20,6 +22,11 @@
_long_marker = re.compile(r'([0-9])L')
_hexadecimal = re.compile(r'0x[0-9a-fA-F]+')
+# Avoid collecting Python3 only files
+collect_ignore = []
+if env.PY2:
+ collect_ignore.append("test_async.py")
+
def _strip_and_dedent(s):
"""For triple-quote strings"""