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

Support Windows file path and general minor fixes #1

Merged
merged 5 commits into from
Mar 1, 2023

Conversation

SteveMattar
Copy link
Contributor

  • Deal with file paths on Windows
  • Avoid missing glyph columns
  • fix buttons naming

Steve Mattar added 3 commits December 25, 2022 17:42
Signed-off-by: Steve Mattar <Steve.Mattar@skai.io>
Signed-off-by: Steve Mattar <Steve.Mattar@skai.io>
Signed-off-by: Steve Mattar <Steve.Mattar@skai.io>
@snipem
Copy link
Owner

snipem commented Feb 26, 2023

I got this error running the test files:

python3 -m pytest
========================== test session starts ==========================
platform darwin -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/xxx/work/gt7telemetry
collected 21 items

test_gt7communication.py ss                                       [  9%]
test_gt7helper.py ..F................                             [100%]

=============================== FAILURES ================================
______ TestHelper.test_calculate_time_diff_by_distance_from_pickle ______

self = <test_gt7helper.TestHelper testMethod=test_calculate_time_diff_by_distance_from_pickle>

    def test_calculate_time_diff_by_distance_from_pickle(self):
        path = os.path.join(os.path.abspath(__file__), 'test_data', 'tsukuba_2laps_rain_first_is_best.pickle')
>       laps = gt7helper.load_laps_from_pickle(path)

test_gt7helper.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

path = '/Users/xxx/work/gt7telemetry/test_gt7helper.py/test_data/tsukuba_2laps_rain_first_is_best.pickle'

    def load_laps_from_pickle(path: str) -> List[Lap]:
>       with open(path, "rb") as f:
E       NotADirectoryError: [Errno 20] Not a directory: '/Users/xxx/work/gt7telemetry/test_gt7helper.py/test_data/tsukuba_2laps_rain_first_is_best.pickle'

gt7helper.py:323: NotADirectoryError
=========================== warnings summary ============================
../../../../usr/local/lib/python3.10/site-packages/salsa20.py:11
  /usr/local/lib/python3.10/site-packages/salsa20.py:11: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== short test summary info ========================
FAILED test_gt7helper.py::TestHelper::test_calculate_time_diff_by_distance_from_pickle
========== 1 failed, 18 passed, 2 skipped, 1 warning in 2.26s ===========
make: *** [test] Error 1

@snipem
Copy link
Owner

snipem commented Feb 26, 2023

@snipem snipem merged commit 5248de1 into snipem:main Mar 1, 2023
@SteveMattar
Copy link
Contributor Author

Hey, sorry for seeing your message just now. Did you manage to fix it?
According to the logs, I see that the test generates a wrong path - it includes the file test_gt7helper.py in the middle

path = '/Users/xxx/work/gt7telemetry/test_gt7helper.py/test_data/tsukuba_2laps_rain_first_is_best.pickle'

@SteveMattar SteveMattar deleted the general_fixes branch March 16, 2023 01:21
@snipem
Copy link
Owner

snipem commented Mar 16, 2023

Yes I fixed it 3a7bfde

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

Successfully merging this pull request may close these issues.

2 participants