Skip to content

Commit e743376

Browse files
1 parent a263eb3 commit e743376

File tree

1 file changed

+2
-96
lines changed

1 file changed

+2
-96
lines changed

noxfile.py

Lines changed: 2 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def default(session, tests_path):
103103
session.run(
104104
"py.test",
105105
"--quiet",
106-
f"--junitxml={os.path.split(tests_path)[-1]}_{session.python}_sponge_log.xml",
106+
f"--junitxml=unit_{session.python}_sponge_log.xml",
107107
"--cov=db_dtypes",
108108
"--cov=tests/unit",
109109
"--cov-append",
@@ -115,104 +115,10 @@ def default(session, tests_path):
115115
)
116116

117117

118-
def prerelease(session, tests_path):
119-
constraints_path = str(
120-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
121-
)
122-
123-
# PyArrow prerelease packages are published to an alternative PyPI host.
124-
# https://arrow.apache.org/docs/python/install.html#installing-nightly-packages
125-
session.install(
126-
"--extra-index-url",
127-
"https://pypi.fury.io/arrow-nightlies/",
128-
"--prefer-binary",
129-
"--pre",
130-
"--upgrade",
131-
"pyarrow",
132-
)
133-
session.install(
134-
"--extra-index-url",
135-
"https://pypi.anaconda.org/scipy-wheels-nightly/simple",
136-
"--prefer-binary",
137-
"--pre",
138-
"--upgrade",
139-
"pandas",
140-
)
141-
session.install(
142-
"mock",
143-
"asyncmock",
144-
"pytest",
145-
"pytest-cov",
146-
"pytest-asyncio",
147-
"-c",
148-
constraints_path,
149-
)
150-
151-
# Because we test minimum dependency versions on the minimum Python
152-
# version, the first version we test with in the unit tests sessions has a
153-
# constraints file containing all dependencies and extras.
154-
with open(
155-
CURRENT_DIRECTORY
156-
/ "testing"
157-
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
158-
encoding="utf-8",
159-
) as constraints_file:
160-
constraints_text = constraints_file.read()
161-
162-
# Ignore leading whitespace and comment lines.
163-
deps = [
164-
match.group(1)
165-
for match in re.finditer(
166-
r"^\s*(\S+)(?===\S+)", constraints_text, flags=re.MULTILINE
167-
)
168-
]
169-
170-
# We use --no-deps to ensure that pre-release versions aren't overwritten
171-
# by the version ranges in setup.py.
172-
session.install(*deps)
173-
session.install("--no-deps", "-e", ".")
174-
175-
# Print out prerelease package versions.
176-
session.run("python", "-m", "pip", "freeze")
177-
178-
# Run py.test against the unit tests.
179-
session.run(
180-
"py.test",
181-
"--quiet",
182-
f"--junitxml={os.path.split(tests_path)[-1]}_prerelease_{session.python}_sponge_log.xml",
183-
"--cov=db_dtypes",
184-
"--cov=tests/unit",
185-
"--cov-append",
186-
"--cov-config=.coveragerc",
187-
"--cov-report=",
188-
"--cov-fail-under=0",
189-
tests_path,
190-
*session.posargs,
191-
)
192-
193-
194-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
195-
def compliance(session):
196-
"""Run the compliance test suite."""
197-
default(session, os.path.join("tests", "compliance"))
198-
199-
200-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
201-
def compliance_prerelease(session):
202-
"""Run the compliance test suite with prerelease dependencies."""
203-
prerelease(session, os.path.join("tests", "compliance"))
204-
205-
206118
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
207119
def unit(session):
208120
"""Run the unit test suite."""
209-
default(session, os.path.join("tests", "unit"))
210-
211-
212-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
213-
def unit_prerelease(session):
214-
"""Run the unit test suite with prerelease dependencies."""
215-
prerelease(session, os.path.join("tests", "unit"))
121+
default(session)
216122

217123

218124
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)

0 commit comments

Comments
 (0)