Skip to content

Commit

Permalink
Merge pull request #707 from SpecLad/fix-windows-tests
Browse files Browse the repository at this point in the history
Fix test failures on Windows
  • Loading branch information
50-Course authored Mar 11, 2024
2 parents 5577dd3 + 5467194 commit 1cb4623
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion project/tests/test_collector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import cProfile
import os.path
import sys

from django.test import TestCase
Expand Down Expand Up @@ -95,5 +96,5 @@ def _get_prof_file_name(cls, request_path: str) -> str:
DataCollector().configure(request)
DataCollector().finalise()
file_path = DataCollector().request.prof_file.name
filename = file_path.rsplit('/')[-1]
filename = os.path.basename(file_path)
return filename.replace(f"{request.id}.prof", "")

0 comments on commit 1cb4623

Please sign in to comment.