-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
- TSPLIB 95 version:
- Python version:
- Operating System:
Description
When rendering a problem, the EOF token is appended without a new line after this token. However in each problem file in the archive, EOF token is appended with a new line.
What I Did
Take this example adapted from test_problem:
from tsplib95 import fields as F
from tsplib95 import models as M
class TestProblem(M.Problem):
foo = F.IntegerField('FOO')
bar = F.StringField('BAR')
text = 'FOO: 42\nBAR: answer\nEOF\n'
assert TestProblem.parse(text).render() == textThe left hand side of the assert statement is 'FOO: 42\nBAR: answer\nEOF' (note the lack of \n at the end).
Metadata
Metadata
Assignees
Labels
No labels