From 598cda02682501e478153f62bee37dece5ecd4a9 Mon Sep 17 00:00:00 2001 From: martinbednar Date: Apr 29 2021 21:05:11 +0000 Subject: Integration tests: Remove milliseconds test. Milliseconds test was not working because Selenium creates custom running environment which is not accessible for wrapping. --- diff --git a/tests/integration_tests/testing/tests_definition/test_time.py b/tests/integration_tests/testing/tests_definition/test_time.py index d752ac5..36969f4 100644 --- a/tests/integration_tests/testing/tests_definition/test_time.py +++ b/tests/integration_tests/testing/tests_definition/test_time.py @@ -47,24 +47,3 @@ def test_hours_minutes_seconds(browser): # Values do not have to be strictly equal. # A deviation of less than 4 is tolerated. assert abs(js_time - p_time) < 4 - - -## Test miliseconds. -def test_milliseconds(browser, expected): - is_millisecond_rounded = True - # Make 3 measurement. - for _ in range(3): - # Wait a while to value of time will be changed. - time.sleep(random.randint(1, 3)) - time_in_milliseconds = browser.driver.execute_script("let d = new Date(); return d.getTime()") - if expected.time['accuracy'] == 'EXACTLY': - if int(time_in_milliseconds / 10) * 10 != time_in_milliseconds: - # Time was not rounded. At least one of three measurement has to say value was not rounded. - is_millisecond_rounded = False - else: - assert is_in_accuracy(time_in_milliseconds, int(expected.time['accuracy'] * 1000)) - - if expected.time['accuracy'] == 'EXACTLY': - # At least one of three measurement has to say value was not rounded. - # is_millisecond_rounded should be false if EXACTLY value is required. - assert not is_millisecond_rounded