style: reformat files with ruff

This commit is contained in:
Tim Grelka
2025-07-03 17:58:29 +02:00
parent d28845aac1
commit f0299298a6
8 changed files with 21 additions and 22 deletions
+2
View File
@@ -69,11 +69,13 @@ def question_stub(input):
answer_pictures=answer_pictures,
)
def include_stub(include):
with open("data/includes.json") as file:
includes = json.load(file)
return includes.get(include)
def test_html(capsys):
with capsys.disabled():
with open("test/acceptanceTest.md") as file:
+1 -1
View File
@@ -7,7 +7,7 @@ from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
@pytest.mark.html
def test_include_html():
assertions = {
'[include:ident]': "ident\n",
"[include:ident]": "ident\n",
}
def test_function(input):
+3 -2
View File
@@ -24,6 +24,7 @@ def test_question_html():
for assertion in assertions:
assert renderer.render(Document(assertion)) == assertions[assertion]
@pytest.mark.html
def test_question_translation_html():
assertions = {
@@ -34,7 +35,7 @@ def test_question_translation_html():
}
def test_function(input):
with open('data/metadata.json') as file:
with open("data/metadata.json") as file:
metadata = json.load(file)
return metadata[f"{input}"].get("number")
@@ -53,7 +54,7 @@ def test_question_latex():
}
def test_function(input):
return "\\question{"+input+"}"
return "\\question{" + input + "}"
with FiftyOhmLaTeXRenderer(test_function) as renderer:
for assertion in assertions: