Skip to content

Commit 2b22282

Browse files
committed
Purposefully break README.rst for test_raises_non_zero_exist_with_readme_error
1 parent 7e51683 commit 2b22282

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Your one-stop solution for managing all standard tasks and core workflows of you
4747
🔌️ Prerequisites
4848
-----------------
4949

50-
- `Python <https://www.python.org/>`__ >= 3.9
50+
- `Python <https://www.python.org/`__ >= 3.9
5151

5252
💾 Installation
5353
---------------

test/unit/nox/_lint_test.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1+
import pytest
2+
from nox.command import CommandFailed
13
from toolbox.nox._lint import dist_check
24

35

46
class TestDistributionCheck:
57
@staticmethod
6-
def test_works_as_expected(nox_session, capsys):
8+
def test_works_as_expected(nox_session):
79
dist_check(nox_session)
10+
11+
@staticmethod
12+
def test_raises_non_zero_exist_with_readme_error(nox_session):
13+
# TODOs
14+
# 1. copy package files to a temp directory
15+
# 2. mock/alter the path for the function you need to use for testing
16+
# 3. modify rst file to have a broken link like is in this commit:
17+
# - `Python <https://www.python.org/`__ >= 3.9
18+
19+
with pytest.raises(CommandFailed) as e:
20+
dist_check(nox_session)
21+
# verify broken with non-zero exit status
22+
assert str(e.value) == "Returned code 1"

0 commit comments

Comments
 (0)