Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: '3.10.5'
cache: 'pip'
- run: pip install --upgrade flake8
- name: flake8
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: '3.10.5'
cache: 'pip'
- run: python -m pip install isort
- name: isort
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: '3.10.5'
cache: 'pip'
- run: pip install --upgrade mypy types-requests types-urllib3
- name: mypy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, pypy-3.9, pypy-3.8, pypy-3.9, 3.10.4, '3.11.0-beta.3' ]
python-version: [3.7, 3.8, 3.9, pypy-3.9, pypy-3.8, pypy-3.9, '3.10.5', '3.11.0-beta.4' ]
os: [
ubuntu-20.04,
windows-2022,
Expand Down
1 change: 1 addition & 0 deletions tests/test_dict2xml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import unittest

from json2xml import dicttoxml


Expand Down
11 changes: 6 additions & 5 deletions tests/test_json2xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
"""Tests for `json2xml` package."""


import json
import unittest
from collections import OrderedDict
from pyexpat import ExpatError

import pytest
import xmltodict
import json
from pyexpat import ExpatError

from json2xml import json2xml
from json2xml.utils import InvalidDataError, readfromjson, readfromstring, readfromurl, \
JSONReadError, StringReadError, URLReadError
from json2xml.utils import (InvalidDataError, JSONReadError, StringReadError,
URLReadError, readfromjson, readfromstring,
readfromurl)


class TestJson2xml(unittest.TestCase):
Expand Down Expand Up @@ -88,7 +89,7 @@ def test_no_wrapper(self):
)
xmldata = json2xml.Json2xml(data, root=False, pretty=False).to_xml()
assert xmldata.startswith(b'<login type="str">mojombo</login>')
self.assertRaises(ExpatError, xmltodict.parse, xmldata)
pytest.raises(ExpatError, xmltodict.parse, xmldata)

def test_item_wrap(self):
data = readfromstring(
Expand Down
Loading