1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
# Copyright (C) 2011-2019, Manfred Moitzi
# License: MIT License
import pytest
import ezdxf
new = ezdxf.new
def test_new_AC1009():
doc = new("R12")
assert "AC1009" == doc.dxfversion
def test_new_AC1015():
doc = new("R2000")
assert "AC1015" == doc.dxfversion
def test_new_AC1018():
doc = new("R2004")
assert "AC1018" == doc.dxfversion
def test_new_AC1021():
doc = new("R2007")
assert "AC1021" == doc.dxfversion
def test_new_AC1024():
doc = new("R2010")
assert "AC1024" == doc.dxfversion
def test_new_AC1027():
doc = new("R2013")
assert "AC1027" == doc.dxfversion
def test_new_AC1032():
doc = new("R2018")
assert "AC1032" == doc.dxfversion
def test_invalid_dxf_version():
with pytest.raises(ezdxf.const.DXFVersionError):
new("R13")
with pytest.raises(ezdxf.const.DXFVersionError):
new("R14")
with pytest.raises(ezdxf.const.DXFVersionError):
new("XYZ")
with pytest.raises(ezdxf.const.DXFVersionError):
new("AC1012")
with pytest.raises(ezdxf.const.DXFVersionError):
new("AC1013")
with pytest.raises(ezdxf.const.DXFVersionError):
new("AC1014")
|