[pypy-commit] pypy pytest: remove the py.test.config.option alias in dotviewer
RonnyPfannschmidt
noreply at buildbot.pypy.org
Wed Sep 26 13:24:04 CEST 2012
Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch: pytest
Changeset: r57603:2ff5bb1a0f70
Date: 2012-09-26 13:23 +0200
http://bitbucket.org/pypy/pypy/changeset/2ff5bb1a0f70/
Log: remove the py.test.config.option alias in dotviewer
diff --git a/dotviewer/conftest.py b/dotviewer/conftest.py
--- a/dotviewer/conftest.py
+++ b/dotviewer/conftest.py
@@ -5,7 +5,3 @@
group.addoption('--pygame', action="store_true",
dest="pygame", default=False,
help="allow interactive tests using Pygame")
-
-def pytest_configure(config):
- global option
- option = config.option
diff --git a/dotviewer/test/test_interactive.py b/dotviewer/test/test_interactive.py
--- a/dotviewer/test/test_interactive.py
+++ b/dotviewer/test/test_interactive.py
@@ -1,6 +1,5 @@
import py
import sys, os, signal, thread, time
-from dotviewer.conftest import option
SOURCE1 = r'''digraph _generated__graph {
subgraph _generated__ {
@@ -35,7 +34,7 @@
'''
def setup_module(mod):
- if not option.pygame:
+ if not py.test.config.option.pygame:
py.test.skip("--pygame not enabled")
udir = py.path.local.make_numbered_dir(prefix='usession-dot-', keep=3)
udir.join('graph1.dot').write(SOURCE1)
diff --git a/dotviewer/test/test_translator.py b/dotviewer/test/test_translator.py
--- a/dotviewer/test/test_translator.py
+++ b/dotviewer/test/test_translator.py
@@ -3,10 +3,9 @@
"""
import py, sys
-from dotviewer.conftest import option
def setup_module(mod):
- if not option.pygame:
+ if not py.test.config.option.pygame:
py.test.skip("--pygame not enabled")
try:
import pypy
More information about the pypy-commit
mailing list