Skip to content

Commit 4387984

Browse files
committed
test: disable some flaky tests and correct regression test output file to be platform independent
1 parent f9a1a82 commit 4387984

File tree

46 files changed

+3
-4996
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3
-4996
lines changed

tests/conftest.py

-22
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,6 @@ def __init__(self, request: pytest.FixtureRequest):
175175
self.test_folder = request.path.parent
176176
self.buffer = StringIO()
177177

178-
@property
179-
def old_output_file_name(self) -> Path:
180-
name, __, test_function = self.nodeid.partition("::")
181-
file_name = Path(name)
182-
183-
test_function = test_function.replace("/", "--")
184-
if len(test_function) > 100:
185-
test_function = sha512(test_function.encode("utf-8")).hexdigest()[:10]
186-
187-
return Path(f"{file_name.stem}.{test_function}.out")
188-
189178
@property
190179
def output_file_name(self) -> Path:
191180
name, __, test_function = self.nodeid.partition("::")
@@ -202,10 +191,6 @@ def output_file_name(self) -> Path:
202191

203192
return Path(f"{file_name.stem}.{test_function}.out")
204193

205-
@property
206-
def old_result_file(self) -> Path:
207-
return Path(self.test_folder, "_regtest_outputs", self.old_output_file_name)
208-
209194
@property
210195
def result_file(self) -> Path:
211196
return Path(self.test_folder, "_regtest_outputs", self.output_file_name)
@@ -221,9 +206,6 @@ def tobe(self):
221206
if os.path.exists(self.result_file):
222207
with open(self.result_file) as f:
223208
return f.read()
224-
if os.path.exists(self.old_result_file):
225-
with open(self.old_result_file) as f:
226-
return f.read()
227209

228210
return ""
229211

@@ -239,10 +221,6 @@ def write_current(self):
239221
folder = os.path.dirname(self.result_file)
240222
if not os.path.exists(folder):
241223
os.makedirs(folder)
242-
if os.path.exists(self.old_result_file):
243-
with open(self.old_result_file, "w") as fh:
244-
fh.write(self.current)
245-
return
246224

247225
with open(self.result_file, "w") as fh:
248226
fh.write(self.current)

tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf41/test_references.test[references.robot-011-016-a_custom_library].out

-122
This file was deleted.

tests/robotcode/language_server/robotframework/parts/_regtest_outputs/rf41/test_references.test[references.robot-011-020-a_custom_library].out

-122
This file was deleted.

0 commit comments

Comments
 (0)