File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -46,15 +46,17 @@ def test_simple_workflow(self, tmp_path):
46
46
pattern = re .compile (r"efficiency_report_[\w-]+\.csv" )
47
47
report_found = False
48
48
49
- for fname in os .listdir ():
50
- if pattern .match (fname ):
51
- report_found = True
52
- report_path = tmp_path / fname
53
- # Verify it's not empty
54
- assert (
55
- report_path .stat ().st_size > 0
56
- ), f"Efficiency report { report_path } is empty"
57
- break
49
+ # as the directory is unclear, we need a path walk:
50
+ for root , dirs , files in os .walk ("/tmp/pytest-of-runner/" ):
51
+ for fname in files :
52
+ if pattern .match (fname ):
53
+ report_found = True
54
+ report_path = os .path .join (root , fname )
55
+ # Verify it's not empty
56
+ assert (
57
+ os .stat (report_path ).st_size > 0
58
+ ), f"Efficiency report { report_path } is empty"
59
+ break
58
60
assert report_found , "Efficiency report file not found"
59
61
60
62
You can’t perform that action at this time.
0 commit comments