Best Python code snippet using hypothesis
test_pretty.py
Source:test_pretty.py
...30 # Generic strategies31 ("from_dtype", from_dtype(xp, xp.int8)),32 ("arrays", arrays(xp, xp.int8, 5)),33 ("scalar_dtypes", scalar_dtypes(xp)),34 ("boolean_dtypes", boolean_dtypes(xp)),35 ("numeric_dtypes", numeric_dtypes(xp)),36 ("integer_dtypes", integer_dtypes(xp)),37 ("unsigned_integer_dtypes", unsigned_integer_dtypes(xp)),38 ("floating_dtypes", floating_dtypes(xp)),39 # Namespaced strategies40 ("from_dtype", xps.from_dtype(xp.int8)),41 ("arrays", xps.arrays(xp.int8, 5)),42 ("scalar_dtypes", xps.scalar_dtypes()),43 ("boolean_dtypes", xps.boolean_dtypes()),44 ("numeric_dtypes", xps.numeric_dtypes()),45 ("integer_dtypes", xps.integer_dtypes()),46 ("unsigned_integer_dtypes", xps.unsigned_integer_dtypes()),47 ("floating_dtypes", xps.floating_dtypes()),48 ]49)50def test_xp_strategies_pretty_repr(name, strat):51 """Strategies that take xp use its __name__ for their own repr."""52 assert repr(strat).startswith(name), f"{name} not in strat repr"53 assert len(repr(strat)) < 100, "strat repr looks too long"...
__init__.py
Source:__init__.py
1from .dtypes import (BOOLEAN_DTYPES, CATEGORICAL_DTYPES, DATETIMES_DTYPES,2 NUMERICAL_DTYPES, ORDERED_DTYPES)3from .impurity import gini, information_gain4from .split import Split, split_numerical, split_ordered_manual, split_ordered...
dtypes.py
Source:dtypes.py
1NUMERICAL_DTYPES = ['float', 'float64', 'int', 'int64']2CATEGORICAL_DTYPES = ['category']3BOOLEAN_DTYPES = ['bool']4DATETIMES_DTYPES = ['datetime64[ns]']...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!