[diffoscope] 01/02: Ensure set_locale fixture runs before all tests.
Chris Lamb
chris at chris-lamb.co.uk
Thu Dec 15 21:31:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 0202e7f1732bc2e75d53cdc12f574c3bf3c6047c
Author: Brett Smith <brettcsmith at brettcsmith.org>
Date: Thu Dec 15 16:14:29 2016 -0500
Ensure set_locale fixture runs before all tests.
See
<http://doc.pytest.org/en/latest/fixture.html#autouse-fixtures-xunit-setup-on-steroids>
for details about the old and new behavior.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
tests/comparators/utils.py | 4 ----
tests/conftest.py | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/comparators/utils.py b/tests/comparators/utils.py
index f796378..0b60826 100644
--- a/tests/comparators/utils.py
+++ b/tests/comparators/utils.py
@@ -31,10 +31,6 @@ from diffoscope.presenters.text import output_text
from diffoscope.comparators.binary import FilesystemFile, NonExistingFile
- at pytest.fixture(autouse=True)
-def set_locale():
- diffoscope.set_locale()
-
def tools_missing(*required):
return not required or any(find_executable(x) is None for x in required)
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 0000000..e238f1b
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,4 @@
+import diffoscope
+import pytest
+
+set_locale = pytest.fixture(autouse=True, scope='session')(diffoscope.set_locale)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list