Skip to content

Commit

Permalink
Fix CCI tests. Real 3.11 target
Browse files Browse the repository at this point in the history
One more CCI fix

More debug info for CCI

More 3.11 changes
  • Loading branch information
Erotemic committed Nov 1, 2022
1 parent 2bca1ca commit 822b445
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
### INITIALIZE AND CACHE REQUIREMENTS ###
- restore_cache:
keys:
- v4-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ .Environment.CIRCLE_JOB }}
- v5-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ .Environment.CIRCLE_JOB }}
- run:
name: install dependencies
command: |
Expand All @@ -112,7 +112,7 @@ jobs:
- save_cache:
paths:
- ./pipcache
key: v4-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ .Environment.CIRCLE_JOB }}
key: v5-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ .Environment.CIRCLE_JOB }}
# ### RUN TESTS ###
- run:
name: run tests
Expand All @@ -137,7 +137,7 @@ jobs:
### INITIALIZE AND CACHE REQUIREMENTS ###
- restore_cache:
keys:
- v4-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/optional.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ checksum "requirements/colors.txt" }}-{{ .Environment.CIRCLE_JOB }}
- v5-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/optional.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ checksum "requirements/colors.txt" }}-{{ .Environment.CIRCLE_JOB }}
- run:
name: install dependencies
command: |
Expand All @@ -154,7 +154,7 @@ jobs:
paths:
#- ./venv
- ./pipcache
key: v4-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/optional.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ checksum "requirements/colors.txt" }}-{{ .Environment.CIRCLE_JOB }}
key: v5-dependencies-{{ checksum "requirements/runtime.txt" }}-{{ checksum "requirements/optional.txt" }}-{{ checksum "requirements/tests.txt" }}-{{ checksum "requirements/jupyter.txt" }}-{{ checksum "requirements/colors.txt" }}-{{ .Environment.CIRCLE_JOB }}
# ### RUN TESTS ###
- run:
name: run tests
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4.2.0
uses: actions/setup-python@v4.3.0
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4.2.0
uses: actions/setup-python@v4.3.0
with:
python-version: 3.8
- name: Upgrade pip
Expand Down Expand Up @@ -104,8 +104,7 @@ jobs:
- '3.8'
- '3.9'
- '3.10'
- '3.11.0-rc.2'
#- '3.11' soon
- '3.11'
- pypy-3.7
install-extras:
- tests
Expand Down
16 changes: 14 additions & 2 deletions src/xdoctest/utils/util_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,20 @@ def _syspath_modname_to_modpath(modname, sys_path=None, exclude=None):
>>> modpath = _syspath_modname_to_modpath(modname)
>>> exclude = [split_modpath(modpath)[0]]
>>> found = _syspath_modname_to_modpath(modname, exclude=exclude)
>>> # this only works if installed in dev mode, pypi fails
>>> assert found is None, 'should not have found {} because we excluded'.format(found, exclude)
>>> if found is not None:
>>> # Note: the basic form of this test may fail if there are
>>> # multiple versions of the package installed. Try and fix that.
>>> other = split_modpath(found)[0]
>>> assert other not in exclude
>>> exclude.append(other)
>>> found = _syspath_modname_to_modpath(modname, exclude=exclude)
>>> if found is not None:
>>> raise AssertionError(
>>> 'should not have found {}.'.format(found)
>>> ' because we excluded: {}.'.format(exclude)
>>> ' cwd={} '.format(os.getcwd())
>>> ' sys.path={} '.format(sys.path)
>>> )
"""
import glob

Expand Down

0 comments on commit 822b445

Please sign in to comment.