Skip to content

Commit

Permalink
Updated tests for flaky hide/hidden tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Nov 11, 2020
1 parent e3585db commit 6166fc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Running the test suite

The tests use pytest so:
The tests use pytest and the flaky plugin so:

`python3 -m pip install pytest`
`python3 -m pip install pytest flaky`

`python3 -m pytest`

Expand Down
7 changes: 5 additions & 2 deletions tests/test_1_photoslibrary.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
""" Test PhotosLibrary class """

from tests.photoscript_config_catalina import PHOTO_EXPORT_FILENAME_ORIGINAL
import pytest
from applescript import AppleScript
from tests.conftest import photoslib, suspend_capture, get_os_version
from flaky import flaky
from tests.conftest import get_os_version, photoslib, suspend_capture
from tests.photoscript_config_catalina import PHOTO_EXPORT_FILENAME_ORIGINAL

OS_VER = get_os_version()[1]
if OS_VER == "15":
Expand Down Expand Up @@ -69,6 +70,7 @@ def test_photoslibrary_running(photoslib):
assert not photoslib.running


@flaky(max_runs=5, min_passes=1)
def test_photoslibrary_hide(photoslib):
""" Test hide() """
import time
Expand All @@ -87,6 +89,7 @@ def test_photoslibrary_hide(photoslib):
assert photoslib.hidden


@flaky(max_runs=5, min_passes=1)
def test_photoslibrary_hidden(photoslib):
""" Test hidden """
import time
Expand Down

0 comments on commit 6166fc7

Please sign in to comment.