mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-31 00:21:47 +01:00
Invalid map format handling
This commit is contained in:
13
tests/test_invalid_format.py
Normal file
13
tests/test_invalid_format.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from pytiled_parser import UnknownFormat, parse_map
|
||||
|
||||
TESTS_DIR = Path(os.path.dirname(os.path.abspath(__file__)))
|
||||
MAP_FILE = TESTS_DIR / "test_data/invalid_format.garbage"
|
||||
|
||||
def test_map_invalid_format():
|
||||
with pytest.raises(UnknownFormat) as e:
|
||||
parse_map(MAP_FILE)
|
||||
Reference in New Issue
Block a user