Commit 39a37c07 authored by Jason R. Coombs's avatar Jason R. Coombs

Disable test on Python 2.

parent 55456fe3
``attr:`` now extracts variables through rudimentary examination of the AST,
thereby supporting modules with third-party imports. If examining the AST
thereby supporting modules with third-party imports. If examining the AST
fails to find the variable, ``attr:`` falls back to the old behavior of
importing the module.
importing the module. Works on Python 3 only.
......@@ -10,6 +10,7 @@ from mock import patch
from setuptools.dist import Distribution, _Distribution
from setuptools.config import ConfigHandler, read_configuration
from setuptools.extern.six.moves import configparser
from setuptools.extern import six
from . import py2_only, py3_only
from .textwrap import DALS
......@@ -310,6 +311,10 @@ class TestMetadata:
with get_dist(tmpdir) as dist:
assert dist.metadata.version == '2016.11.26'
if six.PY2:
# static version loading is unsupported on Python 2
return
config.write(
'[metadata]\n'
'version = attr: fake_package.subpkg_b.mod.VERSION\n'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment