Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on Windows #175

Closed
dkfellows opened this issue Apr 20, 2022 · 0 comments · Fixed by #179
Closed

Tests fail on Windows #175

dkfellows opened this issue Apr 20, 2022 · 0 comments · Fixed by #179
Assignees
Milestone

Comments

@dkfellows
Copy link
Member

Some tests include an assumption about the directory separator that are invalid on Windows in at least some configurations.

Example:

======================================================================
FAIL: test_too_few (make_tools.test_file_convert.TestConverter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Donal\git\SpiNNUtils\unittests\make_tools\test_file_convert.py", line 168, in test_too_few
    FileConverter.convert(src, dest, "too_few.c")
  File "c:\users\donal\git\spinnutils\spinn_utilities\make_tools\file_converter.py", line 626, in convert
    FileConverter()(source, destination, file_id, log_database)
  File "c:\users\donal\git\spinnutils\spinn_utilities\make_tools\file_converter.py", line 133, in __call__
    if not self._process_line(dest_f, line_num, text):
  File "c:\users\donal\git\spinnutils\spinn_utilities\make_tools\file_converter.py", line 175, in _process_line
    return self._process_line_normal_code(dest_f, line_num, text)
  File "c:\users\donal\git\spinnutils\spinn_utilities\make_tools\file_converter.py", line 321, in _process_line_normal_code
    return self._process_line_in_log(dest_f, line_num, text[start_len:])
  File "c:\users\donal\git\spinnutils\spinn_utilities\make_tools\file_converter.py", line 247, in _process_line_in_log
    self._write_log_method(dest_f, line_num)
  File "c:\users\donal\git\spinnutils\spinn_utilities\make_tools\file_converter.py", line 457, in _write_log_method
    short_log = self._short_log(line_num)
  File "c:\users\donal\git\spinnutils\spinn_utilities\make_tools\file_converter.py", line 420, in _short_log
    raise Exception(
Exception: Too few parameters in line "test %f %i", -1.0f); at 19 in C:\Users\Donal\git\SpiNNUtils\unittests\make_tools\mistakes\too_few.c

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Donal\git\SpiNNUtils\unittests\make_tools\test_file_convert.py", line 173, in test_too_few
    self.assertIn("mistakes/too_few.c", str(ex1))
AssertionError: 'mistakes/too_few.c' not found in 'Too few parameters in line "test %f %i", -1.0f); at 19 in C:\\Users\\Donal\\git\\SpiNNUtils\\unittests\\make_tools\\mistakes\\too_few.c'

I do not think this is a significant failure; it's just looking for the wrong thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants