Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: end-of-file-fixer

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.22
rev: v0.16.2
hooks:
- id: ruff-check
types_or: [python, pyi, jupyter]
Expand Down
2 changes: 1 addition & 1 deletion notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"metadata": {},
"outputs": [],
"source": [
"import pytest\n",
"import ipytest\n",
"import pytest\n",
"\n",
"ipytest.autoconfig()"
]
Expand Down
3 changes: 2 additions & 1 deletion test_area.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from area import area_of_square, area_of_rectangle
import pytest

from area import area_of_rectangle, area_of_square


def test_area_of_square():
# for integers, we can simply assert they are equal
Expand Down
6 changes: 3 additions & 3 deletions test_text.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from text import count_lines, count_characters, count_bytes
import pytest
import requests

from text import count_bytes, count_characters, count_lines


@pytest.fixture
def test_file_generator(tmp_path):
def _test_file(n_lines):
filename = tmp_path / "temp_file.txt"
with open(filename, "w") as f:
for _ in range(n_lines):
f.write("hello\n")
f.writelines("hello\n" for _ in range(n_lines))
return filename

return _test_file
Expand Down