Skip to content

Commit

Permalink
SQ -> ...
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfstr committed Dec 25, 2023
1 parent d0eefcc commit e1b6333
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-github-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: screenshots
name: screenshots-${{ matrix.os }}-${{ matrix.python-version }}
path: ${{ github.workspace }}/screenshots/**/*
if-no-files-found: ignore

Expand Down
7 changes: 4 additions & 3 deletions src/crystal/tests/util/screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ def screenshot_if_raises() -> Iterator[None]:
os.makedirs(screenshots_dirpath, exist_ok=True)

screenshot_filename = os.environ.get('CRYSTAL_SCREENSHOT_ID', 'screenshot') + '.png'
screenshot_filepath = os.path.join(screenshots_dirpath, screenshot_filename)
print('*** Saving screenshot to: ' + os.path.abspath(screenshot_filepath), file=sys.stderr)
screenshot_filepath = os.path.abspath(os.path.join(screenshots_dirpath, screenshot_filename))
print('*** Saving screenshot to: ' + screenshot_filepath, file=sys.stderr)
pyscreeze.screenshot(screenshot_filepath)
assert os.path.exists(os.path.abspath(screenshot_filepath))
if not os.path.exists(screenshot_filepath):
print('*** Screenshot not saved. Is this macOS and the Screen Recording permission has not been granted?', file=sys.stderr)

# Continue raising
raise

0 comments on commit e1b6333

Please sign in to comment.