11import ast
22
33from datetime import timedelta
4- from hypothesis import given , settings , Verbosity , note , HealthCheck
54
6- from folding import FoldableExpression
7- from patterns import Pattern
8- from python_minifier import ModulePrinter
5+ from hypothesis import HealthCheck , Verbosity , given , note , settings
6+
97from python_minifier .ast_compare import compare_ast
108from python_minifier .ast_printer import print_ast
119from python_minifier .expression_printer import ExpressionPrinter
12- from expressions import Expression
13- from module import Module , TypeAlias
10+ from python_minifier .module_printer import ModulePrinter
1411from python_minifier .rename .mapper import add_parent
1512from python_minifier .transforms .constant_folding import FoldConstants
1613
14+ from .expressions import Expression
15+ from .folding import FoldableExpression
16+ from .module import Module , TypeAlias
17+ from .patterns import Pattern
18+
1719
1820@given (node = Expression ())
1921@settings (report_multiple_bugs = False , deadline = timedelta (seconds = 1 ), max_examples = 100 , suppress_health_check = [HealthCheck .too_slow ]) #verbosity=Verbosity.verbose
@@ -28,7 +30,7 @@ def test_expression(node):
2830
2931
3032@given (node = Module ())
31- @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 1 ), max_examples = 100 , suppress_health_check = [HealthCheck .too_slow ]) # verbosity=Verbosity.verbose
33+ @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 1 ), max_examples = 100 , suppress_health_check = [HealthCheck .too_slow ], verbosity = Verbosity .verbose )
3234def test_module (node ):
3335 assert isinstance (node , ast .Module )
3436
@@ -61,7 +63,7 @@ def test_pattern(node):
6163 compare_ast (module , ast .parse (code , 'test_pattern' ))
6264
6365@given (node = FoldableExpression ())
64- @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 1 ), max_examples = 100000 , suppress_health_check = [HealthCheck .too_slow ]) #verbosity=Verbosity.verbose
66+ @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 1 ), max_examples = 1000 , suppress_health_check = [HealthCheck .too_slow ]) #verbosity=Verbosity.verbose
6567def test_folding (node ):
6668 assert isinstance (node , ast .AST )
6769 note (print_ast (node ))
@@ -74,7 +76,7 @@ def test_folding(node):
7476 constant_folder (node )
7577
7678@given (node = TypeAlias ())
77- @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 2 ), max_examples = 1000 , verbosity = Verbosity .verbose )
79+ @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 2 ), max_examples = 100 , verbosity = Verbosity .verbose )
7880def test_type_alias (node ):
7981
8082 module = ast .Module (
@@ -88,7 +90,7 @@ def test_type_alias(node):
8890 compare_ast (module , ast .parse (code , 'test_type_alias' ))
8991
9092@given (node = TypeAlias ())
91- @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 2 ), max_examples = 1000 , verbosity = Verbosity .verbose )
93+ @settings (report_multiple_bugs = False , deadline = timedelta (seconds = 2 ), max_examples = 100 , verbosity = Verbosity .verbose )
9294def test_function_type_param (node ):
9395
9496 module = ast .Module (
0 commit comments