Best Python code snippet using hypothesis
config.py
Source:config.py
...3import numpy4from . import error5_key_path = None6mjpro_path = None7def get_key_path():8 return _key_path9def init_config():10 global _key_path, mjpro_path11 _key_path = os.environ.get('MUJOCO_PY_MJKEY_PATH')12 if _key_path and not os.path.exists(_key_path):13 raise error.MujocoDependencyError('MUJOCO_PY_MJKEY_PATH path does not exist: {}'.format(_key_path))14 mjpro_path = os.environ.get('MUJOCO_PY_MJPRO_PATH')15 if mjpro_path and not os.path.exists(mjpro_path):16 raise error.MujocoDependencyError('MUJOCO_PY_MJPRO_PATH path does not exist: {}'.format(mjpro_path))17 default__key_path = os.path.expanduser('~/.mujoco/mjkey.txt')18 default_mjpro_path = os.path.expanduser('~/.mujoco/mjpro131')19 if not _key_path and os.path.exists(default__key_path):20 _key_path = default__key_path21 if not mjpro_path and os.path.exists(default_mjpro_path):...
_context.py
Source:_context.py
1from typing import Tuple, Union, Iterable2class GenerationContext:3 """Context of randomly construction.4 """5 _key_path: Tuple[Union[int, str]]6 _current_schema: dict7 @classmethod8 def root(cls, current_schema: dict):9 return GenerationContext(path=tuple(), current_schema=current_schema)10 def __init__(self, path: Iterable[Union[int, str]], current_schema: dict):11 self._key_path = tuple(path)12 self._current_schema = current_schema13 @property14 def key_path(self) -> Tuple[Union[int, str]]:15 return self._key_path16 def resolve(self, key: Union[int, str], current_schema: dict):17 return GenerationContext(path=(*self._key_path, key), current_schema=current_schema)18class SchemaContext:19 """Context of factory construction.20 """21 _key_path: Tuple[Union[int, str]]22 _current_schema: dict23 _is_for_options: bool = False24 @classmethod25 def root(cls, current_schema: dict):26 return SchemaContext(path=tuple(), current_schema=current_schema)27 @classmethod28 def for_options(cls, current_schema: dict, path: Iterable[Union[int, str]]):29 # Options å
ã®ã¹ãã¼ãã使ç¨ããå ´åã® context30 return SchemaContext(path=path, current_schema=current_schema, for_options=True)31 def __init__(self, path: Iterable[Union[int, str]], current_schema: dict, for_options: bool = False):32 self._key_path = tuple(path) if path is not None else None33 self._current_schema = current_schema34 self._is_for_options = for_options35 @property36 def key_path(self) -> Tuple[Union[int, str]]:37 return self._key_path38 def resolve(self, key: Union[int, str], current_schema: dict):...
Check out the latest blogs from LambdaTest on this topic:
Pair testing can help you complete your testing tasks faster and with higher quality. But who can do pair testing, and when should it be done? And what form of pair testing is best for your circumstance? Check out this blog for more information on how to conduct pair testing to optimize its benefits.
Agile software development stems from a philosophy that being agile means creating and responding to change swiftly. Agile means having the ability to adapt and respond to change without dissolving into chaos. Being Agile involves teamwork built on diverse capabilities, skills, and talents. Team members include both the business and software development sides working together to produce working software that meets or exceeds customer expectations continuously.
Howdy testers! If you’re reading this article I suggest you keep a diary & a pen handy because we’ve added numerous exciting features to our cross browser testing cloud and I am about to share them with you right away!
Howdy testers! June has ended, and it’s time to give you a refresher on everything that happened at LambdaTest over the last month. We are thrilled to share that we are live with Cypress testing and that our very own LT Browser is free for all LambdaTest users. That’s not all, folks! We have also added a whole new range of browsers, devices & features to make testing more effortless than ever.
With the rise of Agile, teams have been trying to minimize the gap between the stakeholders and the development team.
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!!