From 42f41be034adb7e763a84144bf457c8b4b8ad0ed Mon Sep 17 00:00:00 2001 From: Dou Date: Fri, 2 Sep 2022 16:56:17 +0800 Subject: [PATCH] change cutoff --- test/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.py b/test/test.py index 8eab940..3279416 100644 --- a/test/test.py +++ b/test/test.py @@ -34,7 +34,7 @@ def test_asymmetricwell(self): self.driver.set_window_size(1280, 720) self.driver.find_element(By.LINK_TEXT, "Avoided Crossing in 1D Asymmetric Quantum Well").click() time.sleep(5) - self.driver.execute_script("window.scrollTo(0, 1000)") + self.driver.execute_script("window.scrollTo(0, 800)") self.driver.find_element(By.CSS_SELECTOR, "label:nth-child(2) > input").click() time.sleep(10) self.driver.save_screenshot("asymmetricwell.png") @@ -51,7 +51,7 @@ def test_asymmetricwell(self): hash0 = imagehash.average_hash(Image.open('asymmetricwell.png')) hash1 = imagehash.average_hash(Image.open('test/asymmetricwell.png')) -cutoff = 5 +cutoff = 1 if hash0 - hash1 < cutoff: print('images are similar')