Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Comma Device authored and pd0wm committed Nov 17, 2021
1 parent 03d4a70 commit 911d14a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions selfdrive/camerad/test/test_exposure.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env python3

import time
import unittest
import os
import numpy as np

from selfdrive.test.helpers import with_processes
Expand Down Expand Up @@ -33,13 +31,10 @@ def _is_exposure_okay(self, i, med_mean=np.array([[0.2,0.4],[0.2,0.6]])):
print([i_median, i_mean])
return med_ex[0] < i_median < med_ex[1] and mean_ex[0] < i_mean < mean_ex[1]


@with_processes(['camerad'])
def test_camera_operation(self):
print("checking image outputs")

start = time.time()
passed = 0
start = time.time()
while time.time() - start < TEST_TIME and passed < REPEAT:
rpic, dpic = get_snapshots(frame="roadCameraState", front_frame="driverCameraState")

Expand All @@ -56,8 +51,7 @@ def test_camera_operation(self):

passed += int(res)
time.sleep(2)
print(passed)
self.assertTrue(passed >= REPEAT)
self.assertGreaterEqual(passed, REPEAT)

if __name__ == "__main__":
unittest.main()

0 comments on commit 911d14a

Please sign in to comment.