今天我从pip 7.1.0升级到7.1.2,现在它不起作用.
$ pip search docker-compose
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/search.py", line 43, in run
pypi_hits = self.search(query, options)
File "/Library/Python/2.7/site-packages/pip/commands/search.py", line 60, in search
hits = pypi.search({'name': query, 'summary': query}, 'or')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1240, in __call__
return self.__send(self.__name, args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1599, in __request
verbose=self.__verbose
File "/Library/Python/2.7/site-packages/pip/download.py", line 788, in request
return self.parse_response(response.raw)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1490, in parse_response
return u.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line …
Run Code Online (Sandbox Code Playgroud) 我在PostgreSQL 9.4表中有两个JSON行:
the_column
----------------------
{"evens": [2, 4, 6]}
{"odds": [1, 3, 5]}
Run Code Online (Sandbox Code Playgroud)
我想将所有行组合成一个JSON对象.(它应该适用于任意数量的行.)
期望的输出:
{"evens": [2, 4, 6], "odds": [1, 3, 5]}
我正在尝试让webdriver.io和Jasmine工作.
按照他们的示例,我的脚本处于test/specs/first/test2.js
(根据配置)并包含:
var webdriverio = require('webdriverio');
describe('my webdriverio tests', function() {
var client = {};
jasmine.DEFAULT_TIMEOUT_INTERVAL = 9999999;
beforeEach(function() {
client = webdriverio.remote({ desiredCapabilities: {browserName: 'firefox'} });
client.init();
});
it('test it', function(done) {
client
.url("http://localhost:3000/")
.waitForVisible("h2.btn.btn-primary")
.click("h2.btn.btn-primary")
.waitForVisible("h2.btn.btn-primary")
.call(done);
});
afterEach(function(done) {
client.end(done);
});
});
Run Code Online (Sandbox Code Playgroud)
我使用wdio作为测试运行器,并使用交互式设置进行设置.该配置是自动生成的,并且非常简单,因此我认为不需要发布它.
在另一个终端窗口中,我正在使用Java 7运行selenium-server-andalone-2.47.1.jar.我的计算机上安装了Firefox(它在运行测试时茫然启动),而我的计算机正在运行OS 10.10. 5.
这是我启动测试运行时发生的情况:
$ wdio wdio.conf.js
=======================================================================================
Selenium 2.0/webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/docs.html.
=======================================================================================
[18:17:22]: SET …
Run Code Online (Sandbox Code Playgroud)