summaryrefslogtreecommitdiff
path: root/tests/end2end/fixtures/quteprocess.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-23 17:29:42 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-03-23 17:29:42 +0100
commitc64733d2445131b383a7ed28e547ed3aff50cdb0 (patch)
tree29d977931e3445b381920ac93640a98329ca56a5 /tests/end2end/fixtures/quteprocess.py
parent24ca7b7919f08cbef5578d83860f40553513ddae (diff)
downloadqutebrowser-c64733d2445131b383a7ed28e547ed3aff50cdb0.tar.gz
qutebrowser-c64733d2445131b383a7ed28e547ed3aff50cdb0.zip
Clean up and fix pathlib conversions
Subprocess arguments should be strings
Diffstat (limited to 'tests/end2end/fixtures/quteprocess.py')
-rw-r--r--tests/end2end/fixtures/quteprocess.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py
index dcf7e2762..0fdc8dfcf 100644
--- a/tests/end2end/fixtures/quteprocess.py
+++ b/tests/end2end/fixtures/quteprocess.py
@@ -504,7 +504,7 @@ class QuteProc(testprocess.Process):
if hasattr(sys, 'frozen'):
if profile:
raise Exception("Can't profile with sys.frozen!")
- executable = pathlib.Path(sys.executable).parent / 'qutebrowser'
+ executable = str(pathlib.Path(sys.executable).parent / 'qutebrowser')
args = []
else:
executable = sys.executable
@@ -513,13 +513,10 @@ class QuteProc(testprocess.Process):
profile_id = '{}_{}'.format(self._instance_id,
next(self._run_counter))
profile_file = profile_dir / '{}.pstats'.format(profile_id)
- try:
- profile_dir.mkdir()
- except FileExistsError:
- pass
- args = [(pathlib.Path('scripts') / 'dev' / 'run_profile.py'),
+ profile_dir.mkdir(exist_ok=True)
+ args = [str(pathlib.Path('scripts') / 'dev' / 'run_profile.py'),
'--profile-tool', 'none',
- '--profile-file', profile_file]
+ '--profile-file', str(profile_file)]
else:
args = ['-bb', '-m', 'qutebrowser']
return executable, args