Debian Codegraph @

pypy/module/pyexpat/test/apptest_pyexpat.py

raw symbols SCIP
1 # spaceconfig = {"usemodules": ["pyexpat"]}
2 import pyexpat
3 import pytest
4
5 def test_error():
6 info = pytest.raises(TypeError, pyexpat.ParserCreate, namespace_separator=1)
7 assert "ParserCreate() argument 'namespace_separator' must be str or None, not int" in str(info.value)
8 info = pytest.raises(TypeError, pyexpat.ParserCreate, encoding=1)
9 assert "ParserCreate() argument 'encoding' must be str or None, not int" in str(info.value)
10
11 def test_set_activation_threshold():
12 parser = pyexpat.ParserCreate()
13 # Raises on error
14 parser.SetAllocTrackerActivationThreshold(1000)
15
16 def test_set_maximum_amplification():
17 parser = pyexpat.ParserCreate()
18 # Raises on error
19 parser.SetAllocTrackerMaximumAmplification(3.0)
20