Commit a9a38182 authored by Jason R. Coombs's avatar Jason R. Coombs

Use consistent numbering for clarity.

parent 3ff6789b
...@@ -698,14 +698,14 @@ class TestNamespaces: ...@@ -698,14 +698,14 @@ class TestNamespaces:
ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n" ns_str = "__import__('pkg_resources').declare_namespace(__name__)\n"
vers_str = "__version__ = %r" vers_str = "__version__ = %r"
for idx, site in enumerate(site_dirs): for number, site in enumerate(site_dirs, 1):
if idx > 0: if number > 1:
sys.path.append(str(site)) sys.path.append(str(site))
nspkg = site / 'nspkg' nspkg = site / 'nspkg'
subpkg = nspkg / 'subpkg' subpkg = nspkg / 'subpkg'
subpkg.ensure_dir() subpkg.ensure_dir()
(nspkg / '__init__.py').write_text(ns_str, encoding='utf-8') (nspkg / '__init__.py').write_text(ns_str, encoding='utf-8')
(subpkg / '__init__.py').write_text(vers_str % (idx + 1), encoding='utf-8') (subpkg / '__init__.py').write_text(vers_str % number, encoding='utf-8')
import nspkg.subpkg import nspkg.subpkg
import nspkg import nspkg
......
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