Skip to content

Commit

Permalink
Fixed test_add_filepath() intermittent failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
theriftlab committed Feb 3, 2024
1 parent 1cc0453 commit 3a21b6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

import os
import random, os
from datetime import datetime

import swisseph as swe
Expand Down Expand Up @@ -98,7 +98,10 @@ def test_add_filepath(native):

# Cache-bust
settings.add_filepath(os.path.dirname(__file__), True)
native2 = charts.Subject(datetime.now(), '32N43.0', '117W9.0')
date_time = datetime.now()
latitude = random.random() * 180 - 90
longitude = random.random() * 360 - 180
native2 = charts.Subject(date_time, latitude, longitude)

with pytest.raises(swe.Error):
charts.Natal(native2)

0 comments on commit 3a21b6e

Please sign in to comment.