function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def config_path(): conf = None if os.name == 'nt': conf = os.path.expandvars("%%appdata%%/.%s/environments.json" % CONFIG_DIRNAME) else: conf = os.path.expanduser("~/.%s/environments.json" % CONFIG_DIRNAME) return conf
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def config(): conf = config_path()
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def style_header(text, width = 0): if not text: return '' width = max(len(text) + HEADER_JUST * 2, width) pad = ' ' * width output = '\n%s%s\n%s\n%s%s\n' % (HEADER_STYLE, pad, text.center(width), pad, Style.RESET_ALL) return output
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def style_text(text, styles, ljust=0, rjust=0, cen=0, lpad=0, rpad=0, pad=0, char=' ', restore=''): if not text: return ''
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def style_multiline(text, styles, ljust=0, rjust=0, cen=0, lpad=0, rpad=0, pad=0, char=' '): if not text: return '' lines = text.split('\n') fmt_text = '' for text in lines: text = style_text(text, styles, ljust, rjust, cen, lpad, rpad, pad, char) fmt_text += text + '\n' ...
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def update_config(configuration=None, add=None): """ Update the environments configuration on-disk. """ existing_config = config() conf = config_path() print(style_header('Zookeeper Environments')) print("") print(style_text('config:', TITLE_STYLE, pad=2), end='') print(styl...
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def clusterstate(zookeepers, all_hosts, node='clusterstate.json'): """ Print clusterstatus.json contents """ zk_hosts = parse_zk_hosts(zookeepers, all_hosts=all_hosts)
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def show_node(zookeepers, node, all_hosts=False, leader=False, debug=False, interactive=False): """ Show a zookeeper node on one or more servers. If the node has children, the children are displayed, If the node doesn't have children, the contents of the node are displayed. If leader is specifi...
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def watch(zookeepers, node, leader=False): """ Watch a particular zookeeper node for changes. """
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def my_listener(state): if state == KazooState.LOST: # Register somewhere that the session was lost print(style_text('Connection Lost', ERROR_STYLE, pad=2)) elif state == KazooState.SUSPENDED: # Handle being disconnected from Zookeeper print(style_te...
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def watch_children(children): global WATCH_COUNTER WATCH_COUNTER += 1
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def watch_data(data, stat, event): global WATCH_COUNTER WATCH_COUNTER += 1
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def admin_command(zookeepers, command, all_hosts=False, leader=False): """ Execute an administrative command """ command = text_type(command) # ensure we have unicode py2/py3 zk_hosts = parse_zk_hosts(zookeepers, all_hosts=all_hosts, leader=leader)
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def sessions_reset(zookeepers, server_id=None, ephemeral=False, solr=False): """ Reset connections/sessions to Zookeeper. """ # TODO support --clients / --solrj option ?
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def get_all_sessions(zk_client): # Get connection/session information conn_results = multi_admin_command(zk_client, b'cons') conn_data = map(parse_admin_cons, conn_results) conn_data = list(itertools.chain.from_iterable(conn_data)) # Get a dict of all valid zookeeper session...
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def break_session(zookeepers, session): with tlock: s_style = style_text("%s" % str(session_id), STATS_STYLE) print(style_text("Resetting session: %s(%s)" % (s_style, all_sessions[session_id]), INFO_STYLE, lpad=2))
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def health_check(zookeepers): zk_client = KazooClient(zookeepers) for check in (check_zookeeper_connectivity, check_ephemeral_sessions_fast, check_ephemeral_znode_consistency, check_ephemeral_dump_consistency, check_watch_sessions_clients, ...
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def cli(): """ Build the CLI menu """
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def verify_json(arg): try: data = json.loads(arg) except ValueError as e: raise argparse.ArgumentTypeError("invalid json: %s" % e)
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def verify_env(arg): try: env_config = config() except ValueError as e: raise argparse.ArgumentTypeError('Cannot read configuration %s' % e)
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def verify_zk(arg): hosts = arg.split('/')[0] hosts = hosts.split(',')
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def verify_add(arg): if '=' not in arg: raise argparse.ArgumentTypeError("You must use the syntax ENVIRONMENT=127.0.0.1:2181") env, zk = arg.split('=') verify_zk(zk)
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def verify_node(arg): if not arg.startswith('/'): raise argparse.ArgumentTypeError("Zookeeper nodes start with /")
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def verify_cmd(arg): if arg.lower() not in ZK_ADMIN_CMDS: raise argparse.ArgumentTypeError("Invalid command '%s'... \nValid Commands: %s" % (arg, '\n '.join(ZK_ADMIN_CMDS)))
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def main(argv=None):
bendemott/solr-zkutil
[ 15, 1, 15, 18, 1486525374 ]
def do_something(fLOG=None): if fLOG: fLOG("Did something.") return 3
sdpython/pyquickhelper
[ 21, 10, 21, 22, 1388194285 ]
def __init__(self): "constructor" self.buffer = StringIO()
sdpython/pyquickhelper
[ 21, 10, 21, 22, 1388194285 ]
def meth(self): pass
github/codeql
[ 5783, 1304, 5783, 842, 1533054951 ]
def meth(self): return super().meth()
github/codeql
[ 5783, 1304, 5783, 842, 1533054951 ]
def meth(self): return super().meth()
github/codeql
[ 5783, 1304, 5783, 842, 1533054951 ]
def meth(self): return super().meth()
github/codeql
[ 5783, 1304, 5783, 842, 1533054951 ]
def meth(self): return super().meth()
github/codeql
[ 5783, 1304, 5783, 842, 1533054951 ]
def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer self._config = config
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.list.metadat...
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=resp...
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def get( self, location_name, # type: str **kwargs # type: Any
Azure/azure-sdk-for-python
[ 3526, 2256, 3526, 986, 1335285972 ]
def __init__(self, *args, **kwargs): self.events = kwargs.pop('events', []) self.raw = kwargs.pop('raw', None) self.it_pos = 0
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def __getitem__(self, val): if isinstance(val, int): return self.events[val] elif isinstance(val, slice): return History(events=self.events[val]) raise TypeError("Unknown slice format: %s" % type(val))
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def __iter__(self): return self
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def last(self): """Returns the last stored event :rtype: swf.models.event.Event """ return self.events[-1]
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def first(self): """Returns the first stored event :rtype: swf.models.event.Event """ return self.events[0]
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def finished(self): """Checks if the History matches with a finished Workflow Execution history state. """ completion_states = ( 'completed', 'failed', 'canceled', 'terminated' ) if (isinstance(self.last, WorkflowExecutionE...
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def reversed(self): for i in xrange(len(self.events) - 1, -1, -1): yield self.events[i]
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def distinct(self): """Extracts distinct history events based on their types :rtype: list of swf.models.event.Event """ distinct_events = [] for key, group in groupby(self.events, lambda e: e.type): g = list(group) # Merge every WorkflowExecution events...
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def compiled(self): """Compiled history version :rtype: swf.models.history.History made of swf.models.event.CompiledEvent """ return self.compile()
botify-labs/python-simple-workflow
[ 18, 4, 18, 15, 1364383242 ]
def annotate( base: F, parents: Callable[[F], List[F]], decorate: Callable[[F], Tuple[List[L], bytes]], diffopts: mdiff.diffopts, skip: Optional[Callable[[F], bool]] = None,
facebookexperimental/eden
[ 4737, 192, 4737, 106, 1462467227 ]
def __mapper_args__(cls): name = cls.__name__ if name == 'ConfigurableOption': return { 'polymorphic_on': 'type_', 'polymorphic_identity': 'configurable_option' } else: return {'polymorphic_identity': camel_case_to_name(name)}
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def query(cls, *args): query = super(ConfigurableOption, cls).query(*args) query = query.filter(ConfigurableOption.active == True) query = query.order_by(ConfigurableOption.order) return query
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def move_up(self): """ Move the current instance up in the category's order """ order = self.order if order > 0: new_order = order - 1 self.__class__.insert(self, new_order)
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def get_next_order(cls): """ :returns: The next available order :rtype: int """ query = DBSESSION().query(func.max(cls.order)).filter_by(active=True) query = query.filter_by( type_=cls.__mapper_args__['polymorphic_identity'] ) query = query.fir...
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def _query_active_items(cls): """ Build a query to collect active items of the current class :rtype: :class:`sqlalchemy.Query` """ return DBSESSION().query(cls).filter_by( type_=cls.__mapper_args__['polymorphic_identity'] ).filter_by(active=True)
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def insert(cls, item, new_order): """ Place the item at the given index :param obj item: The item to move :param int new_order: The new index of the item """ query = cls._query_active_items() items = query.filter(cls.id != item.id).order_by(cls.order).all() ...
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def reorder(cls): """ Regenerate order attributes """ items = cls._query_active_items().order_by(cls.order).all() for index, item in enumerate(items): item.order = index DBSESSION().merge(item)
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def test_default_disable(): from autonomie.forms.user.user import deferred_company_disable_default companies = [Dummy(employees=range(2))] user = Dummy(companies=companies) req = Dummy(context=user) assert not deferred_company_disable_default("", {'request': req}) companies = [Dummy(employees=[1...
CroissanceCommune/autonomie
[ 21, 14, 21, 284, 1381245170 ]
def test_crisp_jaccard_sim(self): """Test abydos.distance.Jaccard.sim (crisp).""" # Base cases self.assertEqual(self.cmp_j_crisp.sim('', ''), 1.0) self.assertEqual(self.cmp_j_crisp.sim('a', ''), 0.0) self.assertEqual(self.cmp_j_crisp.sim('', 'a'), 0.0) self.assertEqual(se...
chrislit/abydos
[ 154, 26, 154, 63, 1398235847 ]
def test_fuzzy_jaccard_sim(self): """Test abydos.distance.Jaccard.sim (fuzzy).""" # Base cases self.assertEqual(self.cmp_j_fuzzy.sim('', ''), 1.0) self.assertEqual(self.cmp_j_fuzzy.sim('a', ''), 0.0) self.assertEqual(self.cmp_j_fuzzy.sim('', 'a'), 0.0) self.assertEqual(se...
chrislit/abydos
[ 154, 26, 154, 63, 1398235847 ]
def test_token_distance(self): """Test abydos.distance._TokenDistance members.""" self.assertAlmostEqual( Jaccard(intersection_type='soft', alphabet=24).sim( 'ATCAACGAGT', 'AACGATTAG' ), 0.68, ) self.assertAlmostEqual( Jacca...
chrislit/abydos
[ 154, 26, 154, 63, 1398235847 ]
def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing-function-docstring # We always want the toolbar on devstack unless running tests from another Docker container hostname = request.get_host() if hostname.startswith('edx.devstack.lms:') or hostname.startswith('lms.devstack.edx:'...
eduNEXT/edx-platform
[ 5, 3, 5, 6, 1390926698 ]
def main(argv): del argv # Unused. if FLAGS.use_tpu: tpu_cluster_resolver = contrib_cluster_resolver.TPUClusterResolver( FLAGS.tpu, zone=FLAGS.tpu_zone, project=FLAGS.gcp_project) tpu_grpc_url = tpu_cluster_resolver.get_master() tf.Session.reset(tpu_grpc_url) if FLAGS.mode in ('train', ...
tensorflow/tpu
[ 5035, 1773, 5035, 290, 1499817279 ]
def __init__(self, syntax, value=None, subtrees=None): """Initializer. Args: syntax: string representation of syntax value: string representation of actual value subtrees: list of tuple(edge_type, subtree nodes or single node) """ self.syntax = syntax self.value = value self....
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def add_child(self, edge_type, child_node): self.children.append((edge_type, child_node))
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def __str__(self): st = '(' + self.get_name() for _, c in self.children: st += c.__str__() st += ')' return st
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def pprint(self, tab_cnt=0): if self.syntax == 'RegexTok' or self.syntax == 'ConstTok': st = ' ' * tab_cnt + self.syntax + '(' _, p1 = self.children[0] _, p2 = self.children[1] _, direct = self.children[2] name = p1.value st += '%s, %d, %s)' % (name, p2.value, direct.value) ...
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def add_edge(parent_node, child_node, edge_type): parent_node.add_child(edge_type, child_node)
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def __init__(self, tree_root, node_types=RFILL_NODE_TYPES, edge_types=RFILL_EDGE_TYPES, add_rev_edge=True): """Initializer. Args: tree_root: ProgNode type; the root of tree representation node_types: dict of nodetype to index edge_types: dict of edgetype to index add_rev_edge: whether a...
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def add_bidir_edge(self, from_idx, to_idx, etype_str): assert etype_str in self.edge_types self.edge_list.append((from_idx, to_idx, self.edge_types[etype_str])) if self.add_rev_edge: # add reversed edge rev_etype_str = 'rev-' + etype_str assert rev_etype_str in self.edge_types self.e...
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def init_env_globals(): """Set module level values from environment variables. Encapsulated here to enable better testing. """ global C7N_SKIP_EVTERR, C7N_DEBUG_EVENT, C7N_CATCH_ERR C7N_SKIP_EVTERR = os.environ.get( 'C7N_SKIP_ERR_EVENT', 'yes') == 'yes' and True or False C7N_DEBUG_EVE...
kapilt/cloud-custodian
[ 2, 2, 2, 8, 1461493242 ]
def setUp(self): super(UtilTest, self).setUp() self._output_dir = tempfile.mkdtemp(dir=absltest.get_default_test_tmpdir())
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def test_save_load_variable(self): file_path = os.path.join(self._output_dir, 'test_output_data.pkl') # Case 1: Nested dictionary. data = {'zz': 1, 'b': 234, 123: 'asdfa', 'dict': {'a': 123, 't': 123}} file_util.save_variable(file_path, data) actual_variable = file_util.load_variable(file_path) ...
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def _get_snapshot(address: str): response = requests.get(f"{address}/api/snapshot") response.raise_for_status() data = response.json() schema_path = os.path.join( os.path.dirname(dashboard.__file__), "modules/snapshot/snapshot_schema.json" ) pprint.pprint(data) jsonschema.validate(in...
ray-project/ray
[ 24488, 4264, 24488, 2914, 1477424310 ]
def wait_for_job_to_succeed(): data = _get_snapshot(address) legacy_job_succeeded = False job_succeeded = False # Test legacy job snapshot (one driver per job). for job_entry in data["data"]["snapshot"]["jobs"].values(): if job_entry["status"] is not None: ...
ray-project/ray
[ 24488, 4264, 24488, 2914, 1477424310 ]
def test_failed_job_status( ray_start_with_dashboard, disable_aiohttp_cache, enable_test_module
ray-project/ray
[ 24488, 4264, 24488, 2914, 1477424310 ]
def wait_for_job_to_fail(): data = _get_snapshot(address) legacy_job_failed = False job_failed = False # Test legacy job snapshot (one driver per job). for job_entry in data["data"]["snapshot"]["jobs"].values(): if job_entry["status"] is not None: as...
ray-project/ray
[ 24488, 4264, 24488, 2914, 1477424310 ]
def __virtual__(): """ Load only on Mac OS """ if not salt.utils.platform.is_darwin(): return ( False, "The mac_utils utility could not be loaded: " "utility only works on MacOS systems.", ) return __virtualname__
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def _check_launchctl_stderr(ret): """ helper class to check the launchctl stderr. launchctl does not always return bad exit code if there is a failure """ err = ret["stderr"].lower() if "service is disabled" in err: return True return False
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def execute_return_result(cmd): """ Executes the passed command. Returns the standard out if successful :param str cmd: The command to run :return: The standard out of the command if successful, otherwise returns an error :rtype: str :raises: Error if command fails or is not supported ...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def validate_enabled(enabled): """ Helper function to validate the enabled parameter. Boolean values are converted to "on" and "off". String values are checked to make sure they are either "on" or "off"/"yes" or "no". Integer ``0`` will return "off". All other integers will return "on" :param e...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def launchctl(sub_cmd, *args, **kwargs): """ Run a launchctl command and raise an error if it fails Args: additional args are passed to launchctl sub_cmd (str): Sub command supplied to launchctl Kwargs: passed to ``cmd.run_all`` return_stdout (bool): A keyword argument. If true return ...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def _available_services(refresh=False): """ This is a helper function for getting the available macOS services. The strategy is to look through the known system locations for launchd plist files, parse them, and use their information for populating the list of services. Services can run without a p...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def console_user(username=False): """ Gets the UID or Username of the current console user. :return: The uid or username of the console user. :param bool username: Whether to return the username of the console user instead of the UID. Defaults to False :rtype: Interger of the UID, or a string...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def unknown_operation(num_qubits: int) -> 'SymbolInfo': """Generates a SymbolInfo object for an unknown operation. Args: num_qubits: the number of qubits in the operation """ symbol_info = SymbolInfo([], []) for _ in range(num_qubits): symbol_info.colors....
quantumlib/Cirq
[ 3678, 836, 3678, 314, 1513294909 ]
def __call__(self, operation: cirq.Operation) -> Optional[SymbolInfo]: return self.resolve(operation)
quantumlib/Cirq
[ 3678, 836, 3678, 314, 1513294909 ]
def resolve(self, operation: cirq.Operation) -> Optional[SymbolInfo]: """Converts cirq.Operation objects into SymbolInfo objects for serialization."""
quantumlib/Cirq
[ 3678, 836, 3678, 314, 1513294909 ]
def resolve(self, operation: cirq.Operation) -> Optional[SymbolInfo]: """Checks for the _circuit_diagram_info attribute of the operation, and if it exists, build the symbol information from it. Otherwise, builds symbol info for an unknown operation. Args: operation: the cirq...
quantumlib/Cirq
[ 3678, 836, 3678, 314, 1513294909 ]
def resolve_operation(operation: cirq.Operation, resolvers: Iterable[SymbolResolver]) -> SymbolInfo: """Builds a SymbolInfo object based off of a designated operation and list of resolvers. The latest resolver takes precendent. Args: operation: the cirq.Operation object to resolve resolvers...
quantumlib/Cirq
[ 3678, 836, 3678, 314, 1513294909 ]
def __init__(self, wire_symbols, location_info, color_info, moment): """Gathers symbol information from an operation and builds an object to represent it in 3D. Args: wire_symbols: a list of symbols taken from circuit_diagram_info() that will be used to represent the ope...
quantumlib/Cirq
[ 3678, 836, 3678, 314, 1513294909 ]
def process(self, fp, artifact): try: phase_config = json.load(fp) except ValueError: uri = build_web_uri('/find_build/{0}/'.format(self.step.job.build_id.hex)) self.logger.warning('Failed to parse json; (step=%s, build=%s)', self.step.id.hex, uri, exc_info=True) ...
dropbox/changes
[ 762, 65, 762, 11, 1379727686 ]
def protest (response, message): response.send_response(200) response.send_header('Content-type','text/plain') response.end_headers() response.wfile.write(message) # Should probably be JSON
Comcast/rulio
[ 339, 58, 339, 28, 1447456380 ]
def do_GET(self): protest(self, "You should POST with json.\n") return
Comcast/rulio
[ 339, 58, 339, 28, 1447456380 ]
def modifyFiles(self): pass
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(self): if self.withUse: if Use.readline: pass if self.withBinary: self.Run('''
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def modifyFile(self, path): return 'sed -i s/^5/1/g %(destdir)s'+path
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(self): TestRecipe1.setup(self)
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def modifyFile(self, path): return 'sed -i s/^6/2/g %(destdir)s'+path
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(self): TestRecipe1.setup(self)
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(self): TestRecipe1.setup(self) self.Config(exceptions = "/etc/.*")
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(r): TestRecipe1.setup(r) r.Remove(r.changed) r.Remove(r.unchanged) r.Remove(r.changedconfig) r.Remove(r.unchangedconfig)
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(r): r.Create('/foo', contents=r.fileText) r.Transient('/foo')
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(r): r.Create('/foo', contents=r.fileText) r.Transient('/foo')
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]
def setup(r): #don't create foo r.Create('/foo2', contents=r.fileText) r.Transient('/foo2')
sassoftware/conary
[ 47, 9, 47, 4, 1396904066 ]