function stringlengths 11 56k | repo_name stringlengths 5 60 | features list |
|---|---|---|
def configuration():
host = os.environ.get("WD_HOST", defaults.DRIVER_HOST)
port = int(os.environ.get("WD_PORT", str(defaults.DRIVER_PORT)))
capabilities = json.loads(os.environ.get("WD_CAPABILITIES", "{}"))
return {
"host": host,
"port": port,
"capabilities": capabilities
} | nwjs/chromium.src | [
136,
133,
136,
45,
1453904223
] |
def current_session():
return _current_session | nwjs/chromium.src | [
136,
133,
136,
45,
1453904223
] |
def url(server_config):
def url(path, protocol="http", domain="", subdomain="", query="", fragment=""):
domain = server_config["domains"][domain][subdomain]
port = server_config["ports"][protocol][0]
host = "{0}:{1}".format(domain, port)
return urlunsplit((protocol, host, path, query... | nwjs/chromium.src | [
136,
133,
136,
45,
1453904223
] |
def inline(url):
"""Take a source extract and produces well-formed documents.
Based on the desired document type, the extract is embedded with
predefined boilerplate in order to produce well-formed documents.
The media type and character set may also be individually configured.
This helper functio... | nwjs/chromium.src | [
136,
133,
136,
45,
1453904223
] |
def trueDummy(tx):
scriptSig = CScript(tx.vin[0].scriptSig)
newscript = []
for i in scriptSig:
if len(newscript) == 0:
assert len(i) == 0
newscript.append(b'\x51')
else:
newscript.append(i)
tx.vin[0].scriptSig = CScript(newscript)
tx.rehash() | JeremyRubin/bitcoin | [
10,
7,
10,
2,
1457071573
] |
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
# This script tests NULLDUMMY activation, which is part of the 'segwit' deployment, so we go through
# normal segwit activation here (and don't use the default always-on behaviour).
self.extra_args = [[
... | JeremyRubin/bitcoin | [
10,
7,
10,
2,
1457071573
] |
def run_test(self):
self.nodes[0].createwallet(wallet_name='wmulti', disable_private_keys=True)
wmulti = self.nodes[0].get_wallet_rpc('wmulti')
w0 = self.nodes[0].get_wallet_rpc(self.default_wallet_name)
self.address = w0.getnewaddress()
self.pubkey = w0.getaddressinfo(self.addre... | JeremyRubin/bitcoin | [
10,
7,
10,
2,
1457071573
] |
def _format_value(self, value):
raise NotImplementedError() | gltn/stdm | [
26,
29,
26,
55,
1401777923
] |
def process(value):
value = self._format_value(value)
if super_proc:
value = super_proc(value)
return value | gltn/stdm | [
26,
29,
26,
55,
1401777923
] |
def literal_processor(self, dialect):
super_proc = self.string_literal_processor(dialect)
def process(value):
value = self._format_value(value)
if super_proc:
value = super_proc(value)
return value
return process | gltn/stdm | [
26,
29,
26,
55,
1401777923
] |
def _format_value(self, value):
if isinstance(value, int):
value = "$[%s]" % value
else:
value = '$."%s"' % value
return value | gltn/stdm | [
26,
29,
26,
55,
1401777923
] |
def draw(self, context):
layout = self.layout
layout.operator("object.vertex_group_sort", icon='SORTALPHA', text="Sort by Name").sort_type = 'NAME'
layout.operator("object.vertex_group_sort", icon='ARMATURE_DATA', text="Sort by Bone Hierarchy").sort_type = 'BONE_HIERARCHY'
layout.operat... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw(self, context):
layout = self.layout
layout.operator("object.shape_key_transfer", icon='COPY_ID') # icon is not ideal
layout.operator("object.join_shapes", icon='COPY_ID') # icon is not ideal
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT').use_topology = Fa... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
# assert(isinstance(item, bpy.types.VertexGroup))
vgroup = item
if self.layout_type in {'DEFAULT', 'COMPACT'}:
layout.prop(vgroup, "name", text="", emboss=False, icon_value=icon)
... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
# assert(isinstance(item, bpy.types.ShapeKey))
obj = active_data
# key = data
key_block = item
if self.layout_type in {'DEFAULT', 'COMPACT'}:
split = layout.split(0.66, False)... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
# assert(isinstance(item, (bpy.types.MeshTexturePolyLayer, bpy.types.MeshLoopColorLayer)))
if self.layout_type in {'DEFAULT', 'COMPACT'}:
layout.prop(item, "name", text="", emboss=False, icon_value=i... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def poll(cls, context):
engine = context.scene.render.engine
return context.mesh and (engine in cls.COMPAT_ENGINES) | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw(self, context):
layout = self.layout
ob = context.object
mesh = context.mesh
space = context.space_data
if ob:
layout.template_ID(ob, "data")
elif mesh:
layout.template_ID(space, "pin_id") | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw(self, context):
layout = self.layout
mesh = context.mesh
split = layout.split()
col = split.column()
col.prop(mesh, "use_auto_smooth")
sub = col.column()
sub.active = mesh.use_auto_smooth and not mesh.has_custom_normals
sub.prop(mesh, "auto_smo... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw(self, context):
layout = self.layout
mesh = context.mesh
layout.prop(mesh, "texture_mesh")
layout.separator()
layout.prop(mesh, "use_auto_texspace")
row = layout.row()
row.column().prop(mesh, "texspace_location", text="Location")
row.column().... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (obj and obj.type in {'MESH', 'LATTICE'} and (engine in cls.COMPAT_ENGINES)) | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def poll(cls, context):
engine = context.scene.render.engine
obj = context.object
return (obj and obj.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE'} and (engine in cls.COMPAT_ENGINES)) | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw(self, context):
layout = self.layout
me = context.mesh
row = layout.row()
col = row.column()
col.template_list("MESH_UL_uvmaps_vcols", "uvmaps", me, "uv_textures", me.uv_textures, "active_index", rows=1)
col = row.column(align=True)
col.operator("mesh... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw(self, context):
layout = self.layout
me = context.mesh
row = layout.row()
col = row.column()
col.template_list("MESH_UL_uvmaps_vcols", "vcols", me, "vertex_colors", me.vertex_colors, "active_index", rows=1)
col = row.column(align=True)
col.operator("m... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def draw(self, context):
layout = self.layout
obj = context.object
me = context.mesh
col = layout.column()
col.operator("mesh.customdata_mask_clear", icon='X')
col.operator("mesh.customdata_skin_clear", icon='X')
if me.has_custom_normals:
col.operat... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def _async_import_options_from_data_if_missing(hass: HomeAssistant, entry: ConfigEntry):
options = dict(entry.options)
if CONF_FALLBACK not in options:
options[CONF_FALLBACK] = entry.data.get(CONF_FALLBACK, True)
hass.config_entries.async_update_entry(entry, options=options) | pschmitt/home-assistant | [
1,
1,
1,
6,
1485261624
] |
def __init__(self, hass, username, password, fallback):
"""Initialize Tado Connector."""
self.hass = hass
self._username = username
self._password = password
self._fallback = fallback
self.device_id = None
self.tado = None
self.zones = None
self.d... | pschmitt/home-assistant | [
1,
1,
1,
6,
1485261624
] |
def fallback(self):
"""Return fallback flag to Smart Schedule."""
return self._fallback | pschmitt/home-assistant | [
1,
1,
1,
6,
1485261624
] |
def update(self):
"""Update the registered zones."""
for zone in self.zones:
self.update_sensor("zone", zone["id"])
for device in self.devices:
self.update_sensor("device", device["id"]) | pschmitt/home-assistant | [
1,
1,
1,
6,
1485261624
] |
def get_capabilities(self, zone_id):
"""Return the capabilities of the devices."""
return self.tado.getCapabilities(zone_id) | pschmitt/home-assistant | [
1,
1,
1,
6,
1485261624
] |
def set_presence(
self, presence=PRESET_HOME, | pschmitt/home-assistant | [
1,
1,
1,
6,
1485261624
] |
def set_zone_overlay(
self,
zone_id=None,
overlay_mode=None,
temperature=None,
duration=None,
device_type="HEATING",
mode=None,
fan_speed=None,
swing=None, | pschmitt/home-assistant | [
1,
1,
1,
6,
1485261624
] |
def _LoadNotificationUrl():
return boto.config.get_value('GSUtil', 'test_notification_url') | catapult-project/catapult | [
1835,
570,
1835,
1039,
1429033745
] |
def test_watch_bucket(self):
"""Tests creating a notification channel on a bucket."""
bucket_uri = self.CreateBucket()
self.RunGsUtil(
['notification', 'watchbucket', NOTIFICATION_URL,
suri(bucket_uri)])
identifier = str(uuid.uuid4())
token = str(uuid.uuid4())
stderr = self.Run... | catapult-project/catapult | [
1835,
570,
1835,
1039,
1429033745
] |
def test_stop_channel(self):
"""Tests stopping a notification channel on a bucket."""
bucket_uri = self.CreateBucket()
stderr = self.RunGsUtil(
['notification', 'watchbucket', NOTIFICATION_URL,
suri(bucket_uri)],
return_stderr=True)
channel_id = re.findall(r'channel identifier:... | catapult-project/catapult | [
1835,
570,
1835,
1039,
1429033745
] |
def test_list_one_channel(self):
"""Tests listing notification channel on a bucket."""
# TODO(b/132277269): Re-enable these once the service-side bug is fixed.
return unittest.skip('Functionality has been disabled due to b/132277269')
bucket_uri = self.CreateBucket()
# Set up an OCN (object change... | catapult-project/catapult | [
1835,
570,
1835,
1039,
1429033745
] |
def add_default_enable(apps, schema_editor):
ForumsConfig = apps.get_model("django_comment_common", "ForumsConfig")
settings_count = ForumsConfig.objects.count()
if settings_count == 0:
# By default we want the comment client enabled, but this is *not* enabling
# discussions themselves by de... | eduNEXT/edx-platform | [
5,
3,
5,
6,
1390926698
] |
def curves( self, basis=IECore.CubicBasisf.linear(), periodic=False, numCurves=4 ) :
vertsPerCurve = IECore.IntVectorData()
pData = IECore.V3fVectorData()
pData.setInterpretation( IECore.GeometricData.Interpretation.Point ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def emptySop( self ) :
obj = hou.node( "/obj" )
geo = obj.createNode( "geo", run_init_scripts=False )
null = geo.createNode( "null" ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def curveSop( self, order=2, periodic=False, parent=None, coordIndex=0 ) : | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def curvesSop( self, numCurves=4, order=2, periodic=False ) : | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def comparePrimAndSop( self, prim, sop ) :
geo = sop.geometry()
for key in [ "floatDetail", "intDetail", "stringDetail" ] :
self.assertEqual( prim[key].data.value, geo.attribValue( key ) ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def compareOpenSplinePrimAndSop( self, prim, sop ) :
geo = sop.geometry()
for key in [ "floatDetail", "intDetail", "stringDetail" ] :
self.assertEqual( prim[key].data.value, geo.attribValue( key ) ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def comparePrimAndAppendedSop( self, prim, sop, origSopPrim, multipleConversions=False ) :
geo = sop.geometry()
for key in [ "floatDetail", "intDetail", "stringDetail" ] :
self.assertEqual( prim[key].data.value, geo.attribValue( key ) ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testCreateConverter( self ) :
converter = IECoreHoudini.ToHoudiniCurvesConverter( self.curves() )
self.assert_( converter.isInstanceOf( IECore.TypeId( IECoreHoudini.TypeId.ToHoudiniCurvesConverter ) ) ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testLinearConversion( self ) :
sop = self.emptySop() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testSplineConversion( self ) :
sop = self.emptySop()
spline = IECore.CubicBasisf.bSpline() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testConversionIntoExistingSop( self ) :
curves = self.curves()
sop = self.curvesSop() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testAppendingIntoExistingSop( self ) :
curves = self.curves()
curvesNumPoints = curves.variableSize( IECore.PrimitiveVariable.Interpolation.Vertex )
sop = self.curvesSop() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testAppendingIntoLockedSop( self ) :
curves = self.curves()
curvesNumPoints = curves.variableSize( IECore.PrimitiveVariable.Interpolation.Vertex )
sop = self.curvesSop() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testSaveLoad( self ) :
hou.hipFile.clear( suppress_save_prompt=True ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testSaveLoadWithLockedSop( self ) :
hou.hipFile.clear( suppress_save_prompt=True ) | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testMultipleConversions( self ) :
curves = self.curves()
curvesNumPoints = curves.variableSize( IECore.PrimitiveVariable.Interpolation.Vertex )
sop = self.curvesSop() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testObjectWasDeleted( self ) :
curves = self.curves()
sop = self.curvesSop() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testWithUnacceptablePrimVars( self ) :
curves = self.curves()
curves["badDetail"] = IECore.PrimitiveVariable( IECore.PrimitiveVariable.Interpolation.Constant, IECore.TransformationMatrixfData() )
curves["badPoint"] = IECore.PrimitiveVariable( IECore.PrimitiveVariable.Interpolation.Vertex, IECore.DoubleVectorD... | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testConvertingOverExistingAttribs( self ) :
curves = self.curves()
sop = self.emptySop()
detailAttr = sop.createOutputNode( "attribcreate", exact_type_name=True )
detailAttr.parm( "name" ).set( "floatDetail" )
detailAttr.parm( "class" ).set( 0 ) # detail
detailAttr.parm( "type" ).set( 0 ) # float
deta... | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testConvertingOverExistingAttribsWithDifferentTypes( self ) :
curves = self.curves()
sop = self.emptySop()
detailAttr = sop.createOutputNode( "attribcreate", exact_type_name=True )
detailAttr.parm( "name" ).set( "floatDetail" )
detailAttr.parm( "class" ).set( 0 ) # detail
detailAttr.parm( "type" ).set( ... | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testVertAttribsCantBeConverted( self ) :
curves = self.curves()
curves["floatVert"] = IECore.PrimitiveVariable( IECore.PrimitiveVariable.Interpolation.FaceVarying, IECore.FloatVectorData( 1 ) )
sop = self.emptySop() | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testBadCurve( self ) : | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testName( self ) : | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testAttributeFilter( self ) : | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def testStandardAttributeConversion( self ) : | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def tearDown( self ) : | code-google-com/cortex-vfx | [
4,
3,
4,
21,
1426431447
] |
def __init__(self, subject):
self.subject = subject | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def test_logic(self, member, logic, operator='eq'):
"""Find the type of test to run on member, and perform that test"""
if type(logic) is dict:
return self.test_dict(member, logic)
elif type(logic) is Logic_AND:
return self.test_and(member, logic)
elif type(logic... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def test_or(self, member, logic):
"""Member is a value, logic is a set of values, ANY of which
can be True
"""
result = False
for test in logic:
result |= self.test_logic(member, test)
return result | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def test_dict(self, member, logic):
"""Member is a value, logic is a dict of other members to
compare to. All other member tests must be True
"""
result = True
for other_member, test in logic.items():
result &= self.test_logic(self.get_member(other_member), test)
... | Microvellum/Fluid-Designer | [
69,
30,
69,
37,
1461884765
] |
def _GetAllCliques(root_node):
"""Return all cliques in the |root_node| tree."""
ret = []
for node in root_node:
ret.extend(node.GetCliques())
return ret | chromium/chromium | [
14247,
5365,
14247,
62,
1517864132
] |
def testGetPath(self):
root = misc.GritNode()
root.StartParsing(u'grit', None)
root.HandleAttribute(u'latest_public_release', u'0')
root.HandleAttribute(u'current_release', u'1')
root.HandleAttribute(u'base_dir', r'..\resource')
translations = empty.TranslationsNode()
translations.StartParsi... | chromium/chromium | [
14247,
5365,
14247,
62,
1517864132
] |
def testLoadTranslations(self):
xml = '''<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="2" source_lang_id="en-US" current_release="3" base_dir=".">
<translations>
<file path="generated_resources_fr.xtb" lang="fr" />
</translations>
<release seq="3">
... | chromium/chromium | [
14247,
5365,
14247,
62,
1517864132
] |
def testConditionalLoadTranslations(self):
xml = '''<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="2" source_lang_id="en-US" current_release="3"
base_dir=".">
<translations>
<if expr="True">
<file path="generated_resources_fr.xtb" lang="fr" />
... | chromium/chromium | [
14247,
5365,
14247,
62,
1517864132
] |
def testLangCodeMapping(self):
grd = grd_reader.Parse(StringIO('''<?xml version="1.0" encoding="UTF-8"?>
<grit latest_public_release="2" source_lang_id="en-US" current_release="3" base_dir=".">
<translations>
<file path="generated_resources_no.xtb" lang="nb" />
<file path="generate... | chromium/chromium | [
14247,
5365,
14247,
62,
1517864132
] |
def __init__(self, stddev, **kwargs):
super(GaussianNoise, self).__init__(**kwargs)
self.supports_masking = True
self.stddev = stddev | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def noised():
return inputs + K.random_normal(
shape=K.shape(inputs), mean=0., stddev=self.stddev) | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def get_config(self):
config = {'stddev': self.stddev}
base_config = super(GaussianNoise, self).get_config()
return dict(list(base_config.items()) + list(config.items())) | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def __init__(self, rate, **kwargs):
super(GaussianDropout, self).__init__(**kwargs)
self.supports_masking = True
self.rate = rate | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def noised():
stddev = np.sqrt(self.rate / (1.0 - self.rate))
return inputs * K.random_normal(
shape=K.shape(inputs), mean=1.0, stddev=stddev) | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def get_config(self):
config = {'rate': self.rate}
base_config = super(GaussianDropout, self).get_config()
return dict(list(base_config.items()) + list(config.items())) | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def __init__(self, rate, noise_shape=None, seed=None, **kwargs):
super(AlphaDropout, self).__init__(**kwargs)
self.rate = rate
self.noise_shape = noise_shape
self.seed = seed
self.supports_masking = True | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def call(self, inputs, training=None):
if 0. < self.rate < 1.:
noise_shape = self._get_noise_shape(inputs)
alpha = 1.6732632423543772848170429916717
scale = 1.0507009873554804934193349852946
def dropped_inputs(inputs=inputs, rate=self.rate, seed=self.seed):
alpha_p = -alpha * scale
... | npuichigo/ttsflow | [
16,
6,
16,
1,
1500635633
] |
def run_perfstress_cmd():
main_loop = _PerfStressRunner()
loop = asyncio.get_event_loop()
loop.run_until_complete(main_loop.start()) | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self, plotly_name="colorsrc", parent_name="scattercarpet.marker", **kwargs | plotly/plotly.py | [
13052,
2308,
13052,
1319,
1385013188
] |
def get_numeric_value(value, func):
"""
:returns: value if parameter value exists OR None if the parameter value does not exist
"""
return func(value) if value and not np.isnan(value) else None | hasadna/anyway | [
69,
235,
69,
293,
1386619033
] |
def get_schools_with_description(schools_description_filepath, schools_coordinates_filepath):
logging.info("\tReading schools description data from '%s'..." % schools_description_filepath)
df_schools = pd.read_excel(schools_description_filepath)
logging.info("\tReading schools coordinates data from '%s'..."... | hasadna/anyway | [
69,
235,
69,
293,
1386619033
] |
def import_to_datastore(schools_description_filepath, schools_coordinates_filepath, batch_size):
try:
assert batch_size > 0
started = datetime.now()
schools = get_schools_with_description(
schools_description_filepath, schools_coordinates_filepath
)
truncate_schoo... | hasadna/anyway | [
69,
235,
69,
293,
1386619033
] |
def hotel_cost(nights):
return 140 * nights | GunnerJnr/_CodeInstitute | [
7,
6,
7,
104,
1501600555
] |
def rental_car_cost(days):
total_car = days * 40
if days >= 7:
total_car -= 50
elif days >= 3:
total_car -= 20
return total_car | GunnerJnr/_CodeInstitute | [
7,
6,
7,
104,
1501600555
] |
def test_list_repository_names(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
repositories = client.list_repository_names()
assert isinstance(repositories, ItemPaged)
count = 0
prev = None
for repo in repositories:
... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_repository_names_by_page(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
results_per_page = 2
total_pages = 0
repository_pages = client.list_repository_names(results_per_page=results_per_page)
prev = None
... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_delete_repository(self, containerregistry_endpoint, containerregistry_resource_group):
self.import_image(containerregistry_endpoint, HELLO_WORLD, [TO_BE_DELETED])
client = self.create_registry_client(containerregistry_endpoint)
client.delete_repository(TO_BE_DELETED)
for repo ... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_delete_repository_does_not_exist(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
client.delete_repository("not_real_repo") | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_get_repository_properties(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
properties = client.get_repository_properties(ALPINE)
assert isinstance(properties, RepositoryProperties)
assert properties.name == ALPINE | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_update_repository_properties(self, containerregistry_endpoint):
repository = self.get_resource_name("repo")
tag_identifier = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repository, tag_identifier)])
client = self.creat... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_update_repository_properties_kwargs(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containe... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_registry_artifacts(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
count = 0
for artifact in client.list_manifest_properties(BUSYBOX):
assert isinstance(artifact, ArtifactManifestProperties)
assert isinsta... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_registry_artifacts_by_page(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
results_per_page = 2
pages = client.list_manifest_properties(BUSYBOX, results_per_page=results_per_page)
page_count = 0
for page in pages.... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_registry_artifacts_descending(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
prev_last_updated_on = None
count = 0
for artifact in client.list_manifest_properties(BUSYBOX, order_by=ArtifactManifestOrder.LAST_UPDATED_ON_D... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_list_registry_artifacts_ascending(self, containerregistry_endpoint):
client = self.create_registry_client(containerregistry_endpoint)
prev_last_updated_on = None
count = 0
for artifact in client.list_manifest_properties(BUSYBOX, order_by=ArtifactManifestOrder.LAST_UPDATED_ON_AS... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_get_manifest_properties(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(containerregistry_en... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def test_get_manifest_properties_does_not_exist(self, containerregistry_endpoint):
repo = self.get_resource_name("repo")
tag = self.get_resource_name("tag")
self.import_image(containerregistry_endpoint, HELLO_WORLD, ["{}:{}".format(repo, tag)])
client = self.create_registry_client(conta... | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.