Skip to content

Commit c172a9f

Browse files
committed
correected tests to match new results
1 parent 2ea43c9 commit c172a9f

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.metals/metals.lock.db

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#FileLock
2-
#Wed Jul 30 15:02:01 BST 2025
2+
#Thu Jul 31 14:30:19 BST 2025
33
hostName=localhost
4-
id=1984368cdad49ef6310e31a8ad975c2da3ea6a244d8
4+
id=19860ab936622402fe2f44aa1920af12cbe404b7acd
55
method=file
6-
server=localhost\:46117
6+
server=localhost\:45175

in2lambda/api/set.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def add_question(
5959
>>> s = Set()
6060
>>> s.add_question("Some title", pf.Para(pf.Str("hello"), pf.Space, pf.Str("there")))
6161
>>> s
62-
Set(questions=[Question(title='Some title', parts=[], images=[], main_text='hello there')])
62+
Set(_name='set', _description='', questions=[Question(title='Some title', parts=[], images=[], main_text='hello there')])
6363
>>> s.add_question(main_text="Normal string text")
6464
>>> s.questions[1].main_text
6565
'Normal string text'
@@ -117,10 +117,10 @@ def to_json(self, output_dir: str) -> None:
117117
... # Check the contents of the set directory
118118
... sorted(os.listdir(f"{temp_dir}/set"))
119119
... # Check the title of the first question
120-
... with open(f"{temp_dir}/set/question_1.json") as file:
120+
... with open(f"{temp_dir}/set/question_000_Question_1.json") as file:
121121
... print(f"Question 1's title: {json.load(file)['title']}")
122122
['set', 'set.zip']
123-
['media', 'question_1.json', 'question_2.json']
123+
['question_000_Question_1.json', 'question_001_Question_2.json', 'set_set.json']
124124
Question 1's title: Question 1
125125
"""
126126
from in2lambda.json_convert import json_convert

in2lambda/filters/markdown.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def image_directories(tex_file: str) -> list[str]:
3232
>>> temp_dir = tempfile.mkdtemp()
3333
>>> tex_file = os.path.join(temp_dir, 'test.tex')
3434
>>> with open(tex_file, 'w') as f:
35-
set: Set,
35+
... f.write("\\graphicspath{{subdir1/}{subdir2/}{subdir3/}}")
3636
45
3737
>>> image_directories(tex_file)
3838
['subdir1/', 'subdir2/', 'subdir3/']
@@ -45,7 +45,7 @@ def image_directories(tex_file: str) -> list[str]:
4545
>>> with open(tex_file, 'w') as f:
4646
... f.write("No image directory")
4747
18
48-
set: The Python API that is used to store the result after processing
48+
>>> image_directories.cache_clear()
4949
>>> image_directories(tex_file)
5050
[]
5151
"""

in2lambda/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def runner(
100100
>>> from in2lambda.main import runner
101101
>>> # Retrieve an example TeX file and run the given filter.
102102
>>> runner(f"{os.path.dirname(in2lambda.__file__)}/filters/PartsSepSol/example.tex", "PartsSepSol") # doctest: +ELLIPSIS
103-
Set(questions=[Question(title='', parts=[Part(text=..., worked_solution=''), ...], images=[], main_text='This is a sample question\n\n'), ...])
103+
Set(_name='set', _description='', questions=[Question(title='', parts=[Part(text=..., worked_solution=''), ...], images=[], main_text='This is a sample question\n\n'), ...])
104104
>>> runner(f"{os.path.dirname(in2lambda.__file__)}/filters/PartsOneSol/example.tex", "PartsOneSol") # doctest: +ELLIPSIS
105-
Set(questions=[Question(title='', parts=[Part(text='This is part (a)\n\n', worked_solution=''), ...], images=[], main_text='Here is some preliminary question information that might be useful.'), ...)
105+
Set(_name='set', _description='', questions=[Question(title='', parts=[Part(text='This is part (a)\n\n', worked_solution=''), ...], images=[], main_text='Here is some preliminary question information that might be useful.'), ...)
106106
"""
107107
# The list of questions for Lambda Feedback as a Python API.
108108
set_obj = Set()

0 commit comments

Comments
 (0)