Exemplo n.º 1
0
 def test_platform_pypy(self):
     with platform_pyimp():
         with sys_platform("darwin"):
             with pypy_version((1, 4, 3)):
                 self.assertIn("PyPy", pyimplementation())
             with pypy_version((1, 4, 3, "a4")):
                 self.assertIn("PyPy", pyimplementation())
Exemplo n.º 2
0
 def test_platform_pypy(self):
     with platform_pyimp():
         with sys_platform("darwin"):
             with pypy_version((1, 4, 3)):
                 self.assertIn("PyPy", pyimplementation())
             with pypy_version((1, 4, 3, "a4")):
                 self.assertIn("PyPy", pyimplementation())
Exemplo n.º 3
0
 def test_platform_pypy(self):
     with platform_pyimp():
         with sys_platform('darwin'):
             with pypy_version((1, 4, 3)):
                 self.assertIn('PyPy', pyimplementation())
             with pypy_version((1, 4, 3, 'a4')):
                 self.assertIn('PyPy', pyimplementation())
Exemplo n.º 4
0
 def test_platform_pypy(self):
     with mock.platform_pyimp():
         with mock.sys_platform("darwin"):
             with mock.pypy_version((1, 4, 3)):
                 assert "PyPy" in pyimplementation()
             with mock.pypy_version((1, 4, 3, "a4")):
                 assert "PyPy" in pyimplementation()
Exemplo n.º 5
0
 def test_platform_pypy(self):
     with platform_pyimp():
         with sys_platform('darwin'):
             with pypy_version((1, 4, 3)):
                 self.assertIn('PyPy', pyimplementation())
             with pypy_version((1, 4, 3, 'a4')):
                 self.assertIn('PyPy', pyimplementation())
Exemplo n.º 6
0
 def test_platform_pypy(self):
     with mock.platform_pyimp():
         with mock.sys_platform('darwin'):
             with mock.pypy_version((1, 4, 3)):
                 assert 'PyPy' in pyimplementation()
             with mock.pypy_version((1, 4, 3, 'a4')):
                 assert 'PyPy' in pyimplementation()
Exemplo n.º 7
0
 def test_platform_pypy(self):
     with mock.platform_pyimp():
         with mock.sys_platform('darwin'):
             with mock.pypy_version((1, 4, 3)):
                 assert 'PyPy' in pyimplementation()
             with mock.pypy_version((1, 4, 3, 'a4')):
                 assert 'PyPy' in pyimplementation()
Exemplo n.º 8
0
def bugreport(app):
    """Returns a string containing information useful in bug reports."""
    import billiard
    import celery
    import kombu

    try:
        trans = app.connection().transport
        driver_v = '%s:%s' % (trans.driver_name, trans.driver_version())
    except Exception:
        driver_v = ''

    return BUGREPORT_INFO % {
        'system': _platform.system(),
        'arch': ', '.join(filter(None, _platform.architecture())),
        'py_i': platforms.pyimplementation(),
        'celery_v': celery.__version__,
        'kombu_v': kombu.__version__,
        'billiard_v': billiard.__version__,
        'py_v': _platform.python_version(),
        'driver_v': driver_v,
        'transport': app.conf.BROKER_TRANSPORT or 'amqp',
        'results': app.conf.CELERY_RESULT_BACKEND or 'disabled',
        'human_settings': app.conf.humanize(),
        'loader': qualname(app.loader.__class__),
    }
Exemplo n.º 9
0
def bugreport(app):
    import billiard
    import celery
    import kombu

    try:
        trans = app.broker_connection().transport
        driver_v = '%s:%s' % (trans.driver_name, trans.driver_version())
    except Exception:
        driver_v = ''

    return BUGREPORT_INFO % {
        'system': _platform.system(),
        'arch': ', '.join(filter(None, _platform.architecture())),
        'py_i': platforms.pyimplementation(),
        'celery_v': celery.__version__,
        'kombu_v': kombu.__version__,
        'billiard_v': billiard.__version__,
        'py_v': _platform.python_version(),
        'driver_v': driver_v,
        'transport': app.conf.BROKER_TRANSPORT or 'amqp',
        'results': app.conf.CELERY_RESULT_BACKEND or 'disabled',
        'human_settings': app.conf.humanize(),
        'loader': qualname(app.loader.__class__),
    }
Exemplo n.º 10
0
def bugreport(app):
    import billiard
    import celery
    import kombu

    try:
        trans = app.broker_connection().transport
        driver_v = "%s:%s" % (trans.driver_name, trans.driver_version())
    except Exception:
        driver_v = ""

    return BUGREPORT_INFO % {
        "system": _platform.system(),
        "arch": ', '.join(filter(None, _platform.architecture())),
        "py_i": platforms.pyimplementation(),
        "celery_v": celery.__version__,
        "kombu_v": kombu.__version__,
        "billiard_v": billiard.__version__,
        "py_v": _platform.python_version(),
        "driver_v": driver_v,
        "transport": app.conf.BROKER_TRANSPORT or "amqp",
        "results": app.conf.CELERY_RESULT_BACKEND or "disabled",
        "human_settings": app.conf.humanize(),
        "loader": qualname(app.loader.__class__),
    }
Exemplo n.º 11
0
def bugreport(app):
    """Returns a string containing information useful in bug reports."""
    import billiard
    import celery
    import kombu

    try:
        conn = app.connection()
        driver_v = '%s:%s' % (conn.transport.driver_name,
                              conn.transport.driver_version())
        transport = conn.transport_cls
    except Exception:
        transport = driver_v = ''

    return BUGREPORT_INFO % {
        'system': _platform.system(),
        'arch': ', '.join(filter(None, _platform.architecture())),
        'py_i': platforms.pyimplementation(),
        'celery_v': celery.VERSION_BANNER,
        'kombu_v': kombu.__version__,
        'billiard_v': billiard.__version__,
        'py_v': _platform.python_version(),
        'driver_v': driver_v,
        'transport': transport,
        'results': app.conf.CELERY_RESULT_BACKEND or 'disabled',
        'human_settings': app.conf.humanize(),
        'loader': qualname(app.loader.__class__),
    }
Exemplo n.º 12
0
def bugreport(app):
    """Returns a string containing information useful in bug reports."""
    import billiard
    import celery
    import kombu

    try:
        conn = app.connection()
        driver_v = '%s:%s' % (conn.transport.driver_name,
                              conn.transport.driver_version())
        transport = conn.transport_cls
    except Exception:
        transport = driver_v = ''

    return BUGREPORT_INFO % {
        'system': _platform.system(),
        'arch': ', '.join(p for p in _platform.architecture() if p),
        'py_i': platforms.pyimplementation(),
        'celery_v': celery.VERSION_BANNER,
        'kombu_v': kombu.__version__,
        'billiard_v': billiard.__version__,
        'py_v': _platform.python_version(),
        'driver_v': driver_v,
        'transport': transport,
        'results': app.conf.CELERY_RESULT_BACKEND or 'disabled',
        'human_settings': app.conf.humanize(),
        'loader': qualname(app.loader.__class__),
    }
Exemplo n.º 13
0
def bugreport(app):
    """Return a string containing information useful in bug-reports."""
    import billiard
    import celery
    import kombu

    try:
        conn = app.connection()
        driver_v = "{0}:{1}".format(conn.transport.driver_name, conn.transport.driver_version())
        transport = conn.transport_cls
    except Exception:  # pylint: disable=broad-except
        transport = driver_v = ""

    return BUGREPORT_INFO.format(
        system=_platform.system(),
        arch=", ".join(x for x in _platform.architecture() if x),
        py_i=pyimplementation(),
        celery_v=celery.VERSION_BANNER,
        kombu_v=kombu.__version__,
        billiard_v=billiard.__version__,
        py_v=_platform.python_version(),
        driver_v=driver_v,
        transport=transport,
        results=maybe_sanitize_url(app.conf.result_backend or "disabled"),
        human_settings=app.conf.humanize(),
        loader=qualname(app.loader.__class__),
    )
Exemplo n.º 14
0
def bugreport(app):
    """Return a string containing information useful in bug-reports."""
    import billiard
    import celery
    import kombu

    try:
        conn = app.connection()
        driver_v = '{0}:{1}'.format(conn.transport.driver_name,
                                    conn.transport.driver_version())
        transport = conn.transport_cls
    except Exception:  # pylint: disable=broad-except
        transport = driver_v = ''

    return BUGREPORT_INFO.format(
        system=_platform.system(),
        arch=', '.join(x for x in _platform.architecture() if x),
        py_i=pyimplementation(),
        celery_v=celery.VERSION_BANNER,
        kombu_v=kombu.__version__,
        billiard_v=billiard.__version__,
        py_v=_platform.python_version(),
        driver_v=driver_v,
        transport=transport,
        results=maybe_sanitize_url(app.conf.result_backend or 'disabled'),
        human_settings=app.conf.humanize(),
        loader=qualname(app.loader.__class__),
    )
Exemplo n.º 15
0
def bugreport(app):
    """Return a string containing information useful in bug reports."""
    import billiard
    import celery
    import kombu

    try:
        conn = app.connection()
        driver_v = '{0}:{1}'.format(conn.transport.driver_name,
                                    conn.transport.driver_version())
        transport = conn.transport_cls
    except Exception:
        transport = driver_v = ''

    return BUGREPORT_INFO.format(
        system=_platform.system(),
        arch=', '.join(x for x in _platform.architecture() if x),
        py_i=pyimplementation(),
        celery_v=celery.VERSION_BANNER,
        kombu_v=kombu.__version__,
        billiard_v=billiard.__version__,
        py_v=_platform.python_version(),
        driver_v=driver_v,
        transport=transport,
        results=app.conf.CELERY_RESULT_BACKEND or 'disabled',
        human_settings=app.conf.humanize(),
        loader=qualname(app.loader.__class__),
    )
Exemplo n.º 16
0
def bugreport(app):
    return BUGREPORT_INFO % {"system": _platform.system(),
                            "arch": _platform.architecture(),
                            "py_i": platforms.pyimplementation(),
                            "celery_v": celery.__version__,
                            "kombu_v": kombu.__version__,
                            "py_v": _platform.python_version(),
                            "transport": app.conf.BROKER_TRANSPORT,
                            "results": app.conf.CELERY_RESULT_BACKEND,
                            "human_settings": app.conf.humanize(),
                            "loader": qualname(app.loader.__class__)}
Exemplo n.º 17
0
def bugreport(app):
    return BUGREPORT_INFO % {
        "system": _platform.system(),
        "arch": _platform.architecture(),
        "py_i": platforms.pyimplementation(),
        "celery_v": celery.__version__,
        "kombu_v": kombu.__version__,
        "py_v": _platform.python_version(),
        "transport": app.conf.BROKER_TRANSPORT,
        "results": app.conf.CELERY_RESULT_BACKEND,
        "human_settings": app.conf.humanize(),
        "loader": qualname(app.loader.__class__)
    }
Exemplo n.º 18
0
 def test_platform_fallback(self):
     with platform_pyimp():
         with sys_platform('darwin'):
             with pypy_version():
                 self.assertEqual('CPython', pyimplementation())
Exemplo n.º 19
0
 def test_platform_jython(self):
     with mock.platform_pyimp():
         with mock.sys_platform('java 1.6.51'):
             assert 'Jython' in pyimplementation()
Exemplo n.º 20
0
 def test_platform_python_implementation(self):
     with mock.platform_pyimp(lambda: 'Xython'):
         assert pyimplementation() == 'Xython'
Exemplo n.º 21
0
 def test_platform_jython(self):
     with mock.platform_pyimp():
         with mock.sys_platform("java 1.6.51"):
             assert "Jython" in pyimplementation()
Exemplo n.º 22
0
 def test_platform_jython(self):
     with platform_pyimp():
         with sys_platform('java 1.6.51'):
             self.assertIn('Jython', pyimplementation())
Exemplo n.º 23
0
 def test_platform_fallback(self):
     with mock.platform_pyimp():
         with mock.sys_platform('darwin'):
             with mock.pypy_version():
                 assert 'CPython' == pyimplementation()
Exemplo n.º 24
0
 def test_platform_python_implementation(self):
     with mock.platform_pyimp(lambda: 'Xython'):
         assert pyimplementation() == 'Xython'
Exemplo n.º 25
0
 def test_platform_python_implementation(self):
     with platform_pyimp(lambda: "Xython"):
         self.assertEqual(pyimplementation(), "Xython")
Exemplo n.º 26
0
 def test_platform_fallback(self):
     with mock.platform_pyimp():
         with mock.sys_platform('darwin'):
             with mock.pypy_version():
                 assert 'CPython' == pyimplementation()
Exemplo n.º 27
0
 def test_platform_fallback(self):
     with mock.platform_pyimp():
         with mock.sys_platform("darwin"):
             with mock.pypy_version():
                 assert "CPython" == pyimplementation()
Exemplo n.º 28
0
 def test_platform_jython(self):
     with platform_pyimp():
         with sys_platform('java 1.6.51'):
             self.assertIn('Jython', pyimplementation())
Exemplo n.º 29
0
 def test_platform_jython(self):
     with platform_pyimp():
         with sys_platform("java 1.6.51"):
             self.assertIn("Jython", pyimplementation())
Exemplo n.º 30
0
 def test_platform_python_implementation(self):
     with mock.platform_pyimp(lambda: 'Xython'):
         self.assertEqual(pyimplementation(), 'Xython')
Exemplo n.º 31
0
 def test_platform_fallback(self):
     with mock.platform_pyimp():
         with mock.sys_platform('darwin'):
             with mock.pypy_version():
                 self.assertEqual('CPython', pyimplementation())
Exemplo n.º 32
0
 def test_platform_jython(self):
     with platform_pyimp():
         with sys_platform("java 1.6.51"):
             self.assertIn("Jython", pyimplementation())
Exemplo n.º 33
0
 def test_platform_jython(self):
     with mock.platform_pyimp():
         with mock.sys_platform('java 1.6.51'):
             assert 'Jython' in pyimplementation()
Exemplo n.º 34
0
 def test_platform_fallback(self):
     with platform_pyimp():
         with sys_platform("darwin"):
             with pypy_version():
                 self.assertEqual("CPython", pyimplementation())
Exemplo n.º 35
0
 def test_platform_python_implementation(self):
     with platform_pyimp(lambda: 'Xython'):
         self.assertEqual(pyimplementation(), 'Xython')