Skip to content

Commit

Permalink
[try] test on python3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Oct 29, 2023
1 parent 16c2365 commit a8dd6f2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"]
python-version: ["3.7", "pypy3.7"]

steps:
- uses: actions/checkout@v3
Expand All @@ -21,8 +21,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip pdm
pdm install
python -m pip install -U pip pdm pytest hypothesis
pdm install --prod
- name: Run tests
run: |
pdm test
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Parse partial JSON generated by LLM"
authors = [{ name = "Muspi Merol", email = "me@promplate.dev" }]
dependencies = []
optional-dependencies = { playground = ["rich"] }
requires-python = ">=3.8"
requires-python = ">=3.7"
readme = "README.md"
license = { text = "MIT" }
scripts = { json-playground = "partial_json_parser.playground:main" }
Expand Down
7 changes: 5 additions & 2 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from math import isnan
from sys import path

from pytest import raises

from partial_json_parser import MalformedJSON, PartialJSON, parse_json
from partial_json_parser.options import *
path.append("..")

from src.partial_json_parser import MalformedJSON, PartialJSON, parse_json
from src.partial_json_parser.options import *


def test_str():
Expand Down
5 changes: 4 additions & 1 deletion tests/test_hypotheses.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from json import dumps
from sys import path

from hypothesis import given, settings
from hypothesis import strategies as st
from tqdm import tqdm

from partial_json_parser import parse_json
path.append("..")

from src.partial_json_parser import parse_json

json = st.recursive(
st.none() | st.booleans() | st.floats() | st.text(),
Expand Down

0 comments on commit a8dd6f2

Please sign in to comment.