Skip to content

Commit

Permalink
Merge pull request #24 from python-rope/lieryan-update-eol
Browse files Browse the repository at this point in the history
Drop Python 3.7, add Python 3.12
  • Loading branch information
lieryan authored Mar 11, 2024
2 parents b289717 + 1ee0435 commit 61daa8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
12 changes: 10 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from pathlib import Path
from unittest.mock import Mock

import pkg_resources
try:
from importlib.resources import files as resources_files
except ImportError:
resources_files = None
import pkg_resources

import pytest
from pylsp import uris
from pylsp.config.config import Config
Expand Down Expand Up @@ -59,7 +64,10 @@ def code_action_context():


def read_fixture_file(name):
return pkg_resources.resource_string(__name__, "fixtures/" + name).decode()
if resources_files:
return (resources_files("test") / f"fixtures/{name}").read_text()
else:
return pkg_resources.resource_string(__name__, "fixtures/" + name).decode()


def create_document(workspace, name):
Expand Down

0 comments on commit 61daa8e

Please sign in to comment.