diff options
author | Dan Willemsen <dwillemsen@google.com> | 2022-03-26 03:42:10 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-26 03:42:10 +0000 |
commit | 5a8b6adcfa54d474a9ad1a772d65bf6716217993 (patch) | |
tree | 690b5fb2994f47324dd4298e676335d4555ee267 /pkg_resources/tests/test_working_set.py | |
parent | df3578c2a35ac125ee592a3f800065e72f6e77c9 (diff) | |
parent | d25f34ce2b67cf462c2936561c8873a66492532e (diff) | |
download | setuptools-5a8b6adcfa54d474a9ad1a772d65bf6716217993.tar.gz |
Upgrade to setuptools 61.1.0 am: adad21eb06 am: 30dd327dfb am: d25f34ce2b
Original change: https://android-review.googlesource.com/c/platform/external/python/setuptools/+/2045746
Change-Id: Ic6335d01130b6b75885d30275ed206a098f42d25
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'pkg_resources/tests/test_working_set.py')
-rw-r--r-- | pkg_resources/tests/test_working_set.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg_resources/tests/test_working_set.py b/pkg_resources/tests/test_working_set.py index 42ddcc8..db13c71 100644 --- a/pkg_resources/tests/test_working_set.py +++ b/pkg_resources/tests/test_working_set.py @@ -12,8 +12,8 @@ from .test_resources import Metadata def strip_comments(s): return '\n'.join( - l for l in s.split('\n') - if l.strip() and not l.strip().startswith('#') + line for line in s.split('\n') + if line.strip() and not line.strip().startswith('#') ) @@ -37,7 +37,7 @@ def parse_distributions(s): requires=['foo>=3.0', 'baz; extra=="feature"'] ''' s = s.strip() - for spec in re.split('\n(?=[^\s])', s): + for spec in re.split(r'\n(?=[^\s])', s): if not spec: continue fields = spec.split('\n', 1) @@ -54,7 +54,7 @@ def parse_distributions(s): yield dist -class FakeInstaller(object): +class FakeInstaller: def __init__(self, installable_dists): self._installable_dists = installable_dists @@ -87,7 +87,7 @@ def parametrize_test_working_set_resolve(*test_list): ): idlist.append(id_) expected = strip_comments(expected.strip()) - if re.match('\w+$', expected): + if re.match(r'\w+$', expected): expected = getattr(pkg_resources, expected) assert issubclass(expected, Exception) else: |