Skip to content

Commit f62a641

Browse files
committed
#33 fixes pytest marks for students tests. by Piotr
1 parent abd4635 commit f62a641

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ markers =
55
slowtest: marks tests as one of slowest (deselect with '-m "not slowtest"')
66
tasks: marks test as one of related to tasks
77
files: marks test as one of related to files
8+
students: marks test as one of related to students

tests/test_cli_students.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def mock_students_delete(mock_students):
2222
return mock_students.return_value.delete
2323

2424

25+
@pytest.mark.students
2526
class TestGet:
2627
def test_exits_early_with_error_when_api_does_not_return_expected_list(
2728
self, mock_students_get
@@ -90,6 +91,7 @@ def test_prints_reversed_sorted_list_of_students_returned_by_the_api_when_sort_r
9091
assert "two\nthree\none" in result.stdout
9192

9293

94+
@pytest.mark.students
9395
class TestDelete:
9496
def test_exits_with_success_when_provided_student_removed(self, mock_students_delete):
9597
mock_students_delete.return_value = True
@@ -108,6 +110,7 @@ def test_exits_with_error_when_no_student_removed(self, mock_students_delete):
108110
assert result.exit_code == 1
109111

110112

113+
@pytest.mark.students
111114
class TestHolidays:
112115
def test_exits_with_success_when_all_students_removed(
113116
self, mock_students_get, mock_students_delete

0 commit comments

Comments
 (0)