Skip to content

Commit

Permalink
Merge remote-tracking branch 'clebergnu/92lts_python312' into 92lts
Browse files Browse the repository at this point in the history
Signed-off-by: Cleber Rosa <[email protected]>
  • Loading branch information
clebergnu committed Jul 17, 2023
2 parents d1ead3e + f1a634d commit 470a6df
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Install Python 3.6 compatible urllib3
if: ${{ matrix.python-version == 3.6 }}
run: python3 -m pip install urllib3==1.26.16
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user
- name: Avocado version
Expand Down Expand Up @@ -94,11 +97,11 @@ jobs:
smokecheck-osx:

name: OS X with Python ${{ matrix.python-version }}
runs-on: macos-10.15
runs-on: macos-12

strategy:
matrix:
python-version: [3.9, 3.10.0]
python-version: [3.11.1]

steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}"
Expand Down
10 changes: 6 additions & 4 deletions avocado/core/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Test loader module.
"""

import imp
import importlib
import inspect
import os
import re
Expand Down Expand Up @@ -281,11 +281,13 @@ def load_test(test_factory):
if isinstance(test_class, str):
module_name = os.path.basename(test_path).split('.')[0]
test_module_dir = os.path.abspath(os.path.dirname(test_path))
# Tests with local dir imports need this
try:
spec = importlib.util.spec_from_file_location(module_name, test_path)
test_module = importlib.util.module_from_spec(spec)
sys.modules[module_name] = test_module
# Tests with local dir imports need this
sys.path.insert(0, test_module_dir)
f, p, d = imp.find_module(module_name, [test_module_dir])
test_module = imp.load_module(module_name, f, p, d)
spec.loader.exec_module(test_module)
except: # pylint: disable=W0702
# On load_module exception we fake the test class and pass
# the exc_info as parameter to be logged.
Expand Down
2 changes: 1 addition & 1 deletion optional_plugins/robot/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
packages=find_packages(),
include_package_data=True,
install_requires=['avocado-framework==%s' % VERSION,
'robotframework>=4.1'],
'robotframework>=4.1,<6.0'],
test_suite='tests',
entry_points={
'console_scripts': [
Expand Down

0 comments on commit 470a6df

Please sign in to comment.