Skip to content

Commit d88e994

Browse files
committed
Adding bash tests in the github actions workflow, patching tomllib (using toml instead)
1 parent b869363 commit d88e994

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ jobs:
5858
run: |
5959
source venv/bin/activate
6060
pytest -vx --dist=loadfile -n auto
61+
62+
- name: Run additional tests in bash scripts for Ubuntu
63+
run: |
64+
source venv/bin/activate
65+
bash tests/test_local.bash
66+
bash tests/test_remote.bash

extract_long_description.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import tomllib
1+
import toml
22
import os
33

44
with open("pyproject.toml", "rb") as f:
5-
pyproject = tomllib.load(f)
5+
pyproject = toml.loads(f.read().decode('utf-8'))
66

77
readme_path = pyproject["project"]["readme"]
88

language_tool_python/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import re
66
import sys
77
from importlib.metadata import version
8-
import tomllib
8+
import toml
99

1010
from .server import LanguageTool
1111
from .utils import LanguageToolError
@@ -14,7 +14,7 @@
1414
__version__ = version("language_tool_python")
1515
except PackageNotFoundError:
1616
with open("pyproject.toml", "rb") as f:
17-
__version__ = tomllib.load(f)["project"]["version"]
17+
__version__ = toml.loads(f.read().decode('utf-8'))["project"]["version"]
1818

1919

2020
def parse_args():

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ urls = { Repository = "https://github.com/jxmorris12/language_tool_python.git" }
1313
dependencies = [
1414
"requests",
1515
"tqdm",
16-
"psutil"
16+
"psutil",
17+
"toml"
1718
]
1819

1920
[project.optional-dependencies]

0 commit comments

Comments
 (0)