我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用wheel.signatures.keys.WheelKeys()。
def wheel_keys(tmpdir, monkeypatch): def load(*args): return [config_path.dirname] def save(*args): return config_path.dirname config_path = tmpdir.join('config.json') config_path.write(b'') monkeypatch.setattr(keys, 'load_config_paths', load) monkeypatch.setattr(keys, 'save_config_path', save) wk = keys.WheelKeys() wk.CONFIG_NAME = config_path.basename return wk
def setUp(self): self.config = tempfile.NamedTemporaryFile(suffix='.json') self.config.close() self.config_path, self.config_filename = os.path.split(self.config.name) def load(*args): return [self.config_path] def save(*args): return self.config_path keys.load_config_paths = load keys.save_config_path = save self.wk = keys.WheelKeys() self.wk.CONFIG_NAME = self.config_filename