]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
move os_environ fixture to conftest.py
authorAlex Morega <alex@grep.ro>
Sat, 6 Jul 2013 13:34:09 +0000 (15:34 +0200)
committerAlex Morega <alex@grep.ro>
Sat, 6 Jul 2013 13:34:09 +0000 (15:34 +0200)
tests/conftest.py [new file with mode: 0644]
tests/test_core.py

diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644 (file)
index 0000000..117a130
--- /dev/null
@@ -0,0 +1,9 @@
+import os
+import pytest
+
+
+@pytest.fixture
+def os_environ(monkeypatch):
+    mock_environ = dict(os.environ)
+    monkeypatch.setattr(os, 'environ', mock_environ)
+    return mock_environ
index 32d4e2c8a7dee26788e62b037116936e8a8c88d2..9341ca8b4156b687f90fca6ad110cf54cbbf1b82 100644 (file)
@@ -12,7 +12,6 @@
 # history and logs, available at http://babel.edgewall.org/log/.
 
 import doctest
-import os
 import unittest
 import pytest
 
@@ -20,13 +19,6 @@ from babel import core, Locale
 from babel.core import default_locale, Locale
 
 
-@pytest.fixture
-def os_environ(monkeypatch):
-    mock_environ = dict(os.environ)
-    monkeypatch.setattr(os, 'environ', mock_environ)
-    return mock_environ
-
-
 def test_locale_provides_access_to_cldr_locale_data():
     locale = Locale('en', 'US')
     assert u'English (United States)' == locale.display_name