mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
ci: faster unit tests (#34161)
* fast * lint * try * clean * this * try even more * more * maybe * what * maybe? * maybe * try this * fix * fast? * now cache? * debug * again... * maybe * NOW! * revert, this is already enough (for now?)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import pytest
|
||||
import numpy as np
|
||||
from collections import defaultdict
|
||||
from enum import Enum
|
||||
@@ -87,8 +86,6 @@ def run_scenarios(scenario, logs):
|
||||
return get_select_fields_data(logs), get_select_fields_data(replayed_logs)
|
||||
|
||||
|
||||
@pytest.mark.xdist_group("test_locationd_scenarios")
|
||||
@pytest.mark.shared_download_cache
|
||||
class TestLocationdScenarios:
|
||||
"""
|
||||
Test locationd with different scenarios. In all these scenarios, we expect the following:
|
||||
|
||||
@@ -82,7 +82,7 @@ class URLFile:
|
||||
|
||||
self._length = self.get_length_online()
|
||||
if not self._force_download and self._length != -1:
|
||||
with atomic_write_in_dir(file_length_path, mode="w") as file_length:
|
||||
with atomic_write_in_dir(file_length_path, mode="w", overwrite=True) as file_length:
|
||||
file_length.write(str(self._length))
|
||||
return self._length
|
||||
|
||||
@@ -105,7 +105,7 @@ class URLFile:
|
||||
# If we don't have a file, download it
|
||||
if not os.path.exists(full_path):
|
||||
data = self.read_aux(ll=CHUNK_SIZE)
|
||||
with atomic_write_in_dir(full_path, mode="wb") as new_cached_file:
|
||||
with atomic_write_in_dir(full_path, mode="wb", overwrite=True) as new_cached_file:
|
||||
new_cached_file.write(data)
|
||||
else:
|
||||
with open(full_path, "rb") as cached_file:
|
||||
|
||||
Reference in New Issue
Block a user