Skip to content

Commit 6a834d3

Browse files
authored
Merge branch 'master' into unittest-mock
2 parents 66bf667 + a1a60d7 commit 6a834d3

File tree

15 files changed

+45
-40
lines changed

15 files changed

+45
-40
lines changed

.circleci/config.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test-tmpl: &test-tmpl
88
99
job-tmpl: &job-tmpl
1010
machine:
11-
image: ubuntu-1604:201903-01
11+
image: ubuntu-2004:202010-01
1212

1313
working_directory: ~/src
1414

@@ -132,11 +132,6 @@ job-tmpl: &job-tmpl
132132

133133
version: 2
134134
jobs:
135-
py27:
136-
<<: *job-tmpl
137-
environment:
138-
PYTHON: "python2.7"
139-
140135
py35:
141136
<<: *job-tmpl
142137
environment:
@@ -169,13 +164,9 @@ workflows:
169164
version: 2
170165
pytest-plugins:
171166
jobs:
172-
- py27
173-
- py35
174167
- py36
175168
- py37
176169
- coveralls:
177170
requires:
178-
- py27
179-
- py35
180171
- py36
181172
- py37

install.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,16 @@ function init_venv {
9696

9797

9898
function update_apt_sources {
99-
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | apt-key add -
100-
. /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | tee /etc/apt/sources.list.d/rethinkdb.list
99+
wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | apt-key add -
100+
. /etc/lsb-release && echo "deb https://download.rethinkdb.com/repository/ubuntu-$DISTRIB_CODENAME $DISTRIB_CODENAME main" | tee /etc/apt/sources.list.d/rethinkdb.list
101101

102-
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | apt-key add -
102+
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -
103103
sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
104104

105105
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
106106
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list
107107

108+
apt install ca-certificates
108109
apt-get update
109110
}
110111

@@ -137,7 +138,7 @@ function install_jenkins {
137138
}
138139

139140
function install_mongodb {
140-
apt-get install -y mongodb-org mongodb-org-server
141+
apt-get install -y mongodb mongodb-server
141142
}
142143

143144
function install_apache {

pytest-devpi-server/_pytest_devpi_server/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ def pre_setup(self):
121121
log.info("Extracting initial server data from {}".format(self.data))
122122
zipfile.ZipFile(self.data, 'r').extractall(self.server_dir)
123123
else:
124-
self.run([sys.executable, '-c', 'import sys; from devpi_server.main import main; sys.exit(main())',
124+
self.run([os.path.join(sys.exec_prefix, "bin", "devpi-init"),
125125
'--serverdir', self.server_dir,
126-
'--init',
127126
])
128127

129128

pytest-devpi-server/tests/integration/test_devpi_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
u"acl_upload": [u"testuser"],
77
u"bases": [],
88
u"mirror_whitelist": [],
9+
u"mirror_whitelist_inheritance": u"intersection",
910
u"projects": [],
1011
u"type": u"stage",
1112
u"volatile": True,

pytest-git/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Here's a noddy test case that shows it working:
2525
```python
2626
def test_git_repo(git_repo):
2727
# The fixture derives from `workspace` in `pytest-shutil`, so they contain
28-
# a handle to the path.py path object (see https://pathpy.readthedocs.io/)
28+
# a handle to the path `path` object (see https://path.readthedocs.io/)
2929
path = git_repo.workspace
3030
file = path / 'hello.txt'
3131
file.write_text('hello world!')

pytest-profiling/pytest_profiling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
def clean_filename(s):
20-
forbidden_chars = set('/?<>\:*|"')
20+
forbidden_chars = set(r'/?<>\:*|"')
2121
return six.text_type("".join(c if c not in forbidden_chars and ord(c) < 127 else '_'
2222
for c in s))
2323

pytest-pyramid-server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Here's a noddy test case showing the main functionality:
5151
# POST a document to the server.
5252
assert pyramid_server.post('/login', 'guest:password123').response_code == 200
5353

54-
# ``path.py`` path object to the running config file
54+
# path ``path`` object to the running config file (see https://path.readthedocs.io/)
5555
assert pyramid_server.working_config.endswith('testing.ini')
5656
```
5757

pytest-server-fixtures/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ All test fixtures share the following properties at runtime:
115115
| `hostname` | Hostname that server is listening on
116116
| `port` | Port number that the server is listening on
117117
| `dead` | True/False: am I dead yet?
118-
| `workspace` | `path.py` object for the temporary directory the server is running out of
118+
| `workspace` | [`path`](https://path.readthedocs.io/) object for the temporary directory the server is running out of
119119

120120
## MongoDB
121121

pytest-server-fixtures/pytest_server_fixtures/postgres.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,22 @@ def run_cmd(self):
103103

104104
def check_server_up(self):
105105
from psycopg2 import OperationalError
106+
conn = None
106107
try:
107108
print("Connecting to Postgres at localhost:{}".format(self.port))
108-
with self.connect('postgres') as conn:
109-
conn.set_session(autocommit=True)
110-
with conn.cursor() as cursor:
111-
cursor.execute("CREATE DATABASE " + self.database_name)
109+
conn = self.connect('postgres')
110+
conn.set_session(autocommit=True)
111+
with conn.cursor() as cursor:
112+
cursor.execute("CREATE DATABASE " + self.database_name)
112113
self.connection = self.connect(self.database_name)
113114
with open(self.workspace / 'db' / 'postmaster.pid', 'r') as f:
114115
self.pid = int(f.readline().rstrip())
115116
return True
116117
except OperationalError as e:
117118
print("Could not connect to test postgres: {}".format(e))
119+
finally:
120+
if conn:
121+
conn.close()
118122
return False
119123

120124
def connect(self, database=None):

pytest-shutil/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The workspace fixture is simply a temporary directory at function-scope with a f
2323
pytest_plugins = ['pytest_shutil']
2424

2525
def test_something(workspace):
26-
# Workspaces contain a handle to the path.py path object (see https://pathpy.readthedocs.io/)
26+
# Workspaces contain a handle to the path `path` object (see https://path.readthedocs.io/)
2727
path = workspace.workspace
2828
script = path / 'hello.sh'
2929
script.write_text('#!/bin/sh\n echo hello world!')

0 commit comments

Comments
 (0)