
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/future/plot_future_imports_broken.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_auto_examples_future_plot_future_imports_broken.py>`
        to download the full example code or to run this example in your browser via Binder

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_future_plot_future_imports_broken.py:


Test without __future__ imports
-------------------------------

Test that __future__ imports inside sphinx_gallery modules does not affect the
parsing of this script.

.. GENERATED FROM PYTHON SOURCE LINES 8-19

.. code-block:: python3


    import sys
    PY3_OR_LATER = sys.version_info[0] >= 3

    # SyntaxError on Python 2
    print(3/2, end='')

    # Need to make this example fail on Python 3 as well (currently no way to say
    # that an example is expected to fail only on Python 2)
    if PY3_OR_LATER:
        raise RuntimeError('Forcing this example to fail on Python 3')


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** ( 0 minutes  0.000 seconds)


.. _sphx_glr_download_auto_examples_future_plot_future_imports_broken.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example


  .. container:: binder-badge

    .. image:: images/binder_badge_logo.svg
      :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/future/plot_future_imports_broken.ipynb
      :alt: Launch binder
      :width: 150 px


  .. container:: sphx-glr-download sphx-glr-download-python

     :download:`Download Python source code: plot_future_imports_broken.py <plot_future_imports_broken.py>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_future_imports_broken.ipynb <plot_future_imports_broken.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
