Skip to content

Commit

Permalink
[macOS] Disable screenshot unit tests in Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
buffer committed Jan 9, 2025
1 parent c028cb2 commit ed101c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
run: |
brew reinstall git autoconf libtool
brew install automake graphviz tesseract libmagic
brew install --cask wkhtmltopdf
ln -s $(which glibtoolize) /usr/local/bin/libtoolize
pip install --upgrade pip setuptools wheel tox tox-gh-actions appdirs
BUILD_LIB=1 pip install --use-pep517 ssdeep
Expand Down
13 changes: 13 additions & 0 deletions tests/functional/test_screenshot.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import os
import logging

import pytest

from thug.ThugAPI.ThugAPI import ThugAPI

log = logging.getLogger("Thug")

IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv(
"RUNNER_OS"
) in ("Linux",)


class TestScreenshot(object):
def do_perform_test(self, caplog, url, expected, type_="remote"):
Expand Down Expand Up @@ -31,10 +38,16 @@ def do_perform_test(self, caplog, url, expected, type_="remote"):

assert matches >= len(expected)

@pytest.mark.skipif(
not (IN_GITHUB_ACTIONS), reason="Test works just in Github Actions (Linux)"
)
def test_antifork(self, caplog):
expected = []
self.do_perform_test(caplog, "https://buffer.antifork.org", expected)

@pytest.mark.skipif(
not (IN_GITHUB_ACTIONS), reason="Test works just in Github Actions (Linux)"
)
def test_invalid_ctype(self, caplog):
expected = []
self.do_perform_test(
Expand Down

0 comments on commit ed101c8

Please sign in to comment.