Selaa lähdekoodia

(test) enhance conftest to lessen false positives in integration tests (#3512)

* conftest: also mask size=xxx parameter in integration tests

* mask random poetry path part

* make regex more flexible
tobitege 1 vuosi sitten
vanhempi
sitoutus
70723581ac
1 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. 10 0
      tests/integration/conftest.py

+ 10 - 0
tests/integration/conftest.py

@@ -50,6 +50,16 @@ def filter_out_symbols(input):
     # openhands@379c7fce40b4:/workspace $
     input = re.sub(r'(openhands|root)@.*(:/.*)', r'\1[DUMMY_HOSTNAME]\2', input)
 
+    # mask the specific part in a poetry path
+    input = re.sub(
+        r'(/open[a-z]{5}/poetry/open[a-z]{5}-)[a-zA-Z0-9-]+(-py3\.\d+/bin/python)',
+        r'\1[DUMMY_STRING]\2',
+        input,
+    )
+
+    # handle size param
+    input = re.sub(r' size=\d+ ', ' size=[DUMMY_SIZE] ', input)
+
     # handle sha256 hashes
     # sha256=4ecf8be428f55981e2a188f510ba5f9022bed88f5fb404d7d949f44382201e3d
     input = re.sub(r'sha256=[a-z0-9]+', 'sha256=[DUMMY_HASH]', input)