Debian Codegraph @

hypothesis-python/tests/nocover/test_simple_strings.py

raw
1 # This file is part of Hypothesis, which may be found at
2 # https://github.com/HypothesisWorks/hypothesis/
3 #
4 # Copyright the Hypothesis Authors.
5 # Individual contributors are listed in AUTHORS.rst and the git log.
6 #
7 # This Source Code Form is subject to the terms of the Mozilla Public License,
8 # v. 2.0. If a copy of the MPL was not distributed with this file, You can
9 # obtain one at https://mozilla.org/MPL/2.0/.
10
11 import unicodedata
12
13 import pytest
14
15 from hypothesis import given, settings
16 from hypothesis.strategies import text
17
18
19 @pytest.mark.skipif(
20 settings.get_current_profile_name() == "crosshair",
21 reason="takes ~10 minutes; many-valued realization is slow",
22 )
23 @given(text(min_size=1, max_size=1))
24 @settings(max_examples=2000)
25 def test_does_not_generate_surrogates(t):
26 assert unicodedata.category(t) != "Cs"