Skip to content

Commit

Permalink
Merge pull request #92 from plotly/andrew/combine_test1_dtd
Browse files Browse the repository at this point in the history
Check for tmpdir always
  • Loading branch information
ayjayt authored Sep 27, 2024
2 parents c7d81fd + 10330f7 commit 24ef55c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ jobs:
- name: diagnostic
run: dtdoctor
timeout-minutes: 1
- name: test1
- name: test
run: pytest
timeout-minutes: 1
- name: test2
run: python app/test1.py
timeout-minutes: 1
test-windows:
runs-on: windows-latest
steps:
Expand All @@ -31,12 +28,9 @@ jobs:
- name: diagnostic
run: dtdoctor
timeout-minutes: 1
- name: test1
- name: test
run: pytest
timeout-minutes: 1
- name: test2
run: python app/test1.py
timeout-minutes: 1
test-mac:
runs-on: macos-latest
steps:
Expand All @@ -49,9 +43,6 @@ jobs:
- name: diagnostic
run: dtdoctor
timeout-minutes: 1
- name: test1
- name: test
run: pytest
timeout-minutes: 1
- name: test2
run: python app/test1.py
timeout-minutes: 1
4 changes: 2 additions & 2 deletions devtools/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def remove_readonly(func, path, excinfo):
warnings.warn(
f"The temporary directory could not be deleted, execution will continue. {type(e)}: {e}", TempDirWarning
)
if self.debug:
print(f"Tempfile still exists?: {bool(os.path.isfile(str(self.temp_dir.name)))}")

def sync_process_close(self):
self.send_command("Browser.close")
Expand Down Expand Up @@ -330,8 +332,6 @@ def close(self):
self.sync_process_close()
# I'd say race condition but the user needs to take care of it
self.finish_close()
if self.debug:
print(f"Tempfile still exists?: {bool(os.path.isfile(str(self.temp_dir.name)))}")
# These are effectively stubs to allow use with with

def __enter__(self):
Expand Down

0 comments on commit 24ef55c

Please sign in to comment.