Skip to content

Commit 80b50e1

Browse files
committed
let it fail
1 parent 2912aa5 commit 80b50e1

File tree

5 files changed

+29
-20
lines changed

5 files changed

+29
-20
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
- name: Install pandas-stubs and run tests on the installed stubs
5959
run: poetry run poe test_dist
6060

61+
# pandas nightly might have deprecated older python versions
6162
- if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
6263
name: Run pytest (against pandas nightly)
6364
run: poetry run poe pytest --nightly

scripts/_job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __rollback_job(steps: Deque[Step]):
3535
)
3636

3737

38-
def run_job(steps: List[Step], exit_on_failure: bool = True) -> None:
38+
def run_job(steps: List[Step]) -> None:
3939
"""
4040
Responsible to run steps with logs.
4141
"""
@@ -66,5 +66,5 @@ def run_job(steps: List[Step], exit_on_failure: bool = True) -> None:
6666
if not failed:
6767
__rollback_job(rollback_steps)
6868

69-
if exit_on_failure and failed:
69+
if failed:
7070
sys.exit(1)

scripts/test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ def stubtest(allowlist: str, check_missing: bool, nightly: bool) -> None:
5050

5151
def pytest(nightly: bool) -> None:
5252
steps = [_step.nightly] if nightly else []
53-
run_job(steps + [_step.pytest], exit_on_failure=not nightly)
53+
run_job(steps + [_step.pytest])

scripts/test/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def pyright_src():
1414

1515

1616
def pytest():
17-
cmd = ["pytest", "--cache-clear"]
17+
cmd = ["pytest", "--cache-clear", "-Werror"]
1818
subprocess.run(cmd, check=True)
1919

2020

tests/test_io.py

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -163,43 +163,51 @@ def test_clipboard_iterator():
163163
def test_sas_bdat() -> None:
164164
path = pathlib.Path(CWD, "data", "airline.sas7bdat")
165165
check(assert_type(read_sas(path), DataFrame), DataFrame)
166-
check(
166+
with check(
167167
assert_type(read_sas(path, iterator=True), Union[SAS7BDATReader, XportReader]),
168168
SAS7BDATReader,
169-
)
170-
check(
169+
):
170+
pass
171+
with check(
171172
assert_type(read_sas(path, iterator=True, format="sas7bdat"), SAS7BDATReader),
172173
SAS7BDATReader,
173-
)
174-
check(
174+
):
175+
pass
176+
with check(
175177
assert_type(read_sas(path, chunksize=1), Union[SAS7BDATReader, XportReader]),
176178
SAS7BDATReader,
177-
)
178-
check(
179+
):
180+
pass
181+
with check(
179182
assert_type(read_sas(path, chunksize=1, format="sas7bdat"), SAS7BDATReader),
180183
SAS7BDATReader,
181-
)
184+
):
185+
pass
182186

183187

184188
def test_sas_xport() -> None:
185189
path = pathlib.Path(CWD, "data", "SSHSV1_A.xpt")
186190
check(assert_type(read_sas(path), DataFrame), DataFrame)
187-
check(
191+
with check(
188192
assert_type(read_sas(path, iterator=True), Union[SAS7BDATReader, XportReader]),
189193
XportReader,
190-
)
191-
check(
194+
):
195+
pass
196+
with check(
192197
assert_type(read_sas(path, iterator=True, format="xport"), XportReader),
193198
XportReader,
194-
)
195-
check(
199+
):
200+
pass
201+
with check(
196202
assert_type(read_sas(path, chunksize=1), Union[SAS7BDATReader, XportReader]),
197203
XportReader,
198-
)
199-
check(
204+
):
205+
pass
206+
with check(
200207
assert_type(read_sas(path, chunksize=1, format="xport"), XportReader),
201208
XportReader,
202-
)
209+
):
210+
pass
203211

204212

205213
def test_hdf():

0 commit comments

Comments
 (0)