mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2026-02-23 15:49:52 +01:00
fix: does_not_raise
This commit is contained in:
@@ -193,7 +193,7 @@ def _parse_layer(
|
|||||||
Returns:
|
Returns:
|
||||||
FIXME
|
FIXME
|
||||||
"""
|
"""
|
||||||
if "id" in layer_element:
|
if "id" in layer_element.attrib:
|
||||||
id_ = int(layer_element.attrib["id"])
|
id_ = int(layer_element.attrib["id"])
|
||||||
else:
|
else:
|
||||||
id_ = None
|
id_ = None
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
"""Unit tests for pytiled_parser"""
|
"""Unit tests for pytiled_parser"""
|
||||||
|
|
||||||
import xml.etree.ElementTree as etree
|
import xml.etree.ElementTree as etree
|
||||||
from contextlib import contextmanager
|
from contextlib import ExitStack as does_not_raise
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from pytiled_parser import objects, utilities, xml_parser
|
from pytiled_parser import objects, utilities, xml_parser
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
|
||||||
def does_not_raise():
|
|
||||||
yield
|
|
||||||
|
|
||||||
|
|
||||||
def _get_root_element(xml: str) -> etree.Element:
|
def _get_root_element(xml: str) -> etree.Element:
|
||||||
"""Get root element of string of XML.
|
"""Get root element of string of XML.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user