oxrlib/tests/__init__.py

15 lines
289 B
Python
Raw Normal View History

2017-05-12 11:40:27 +00:00
import datetime
2017-05-09 13:56:08 +00:00
import pathlib
2017-05-12 11:40:27 +00:00
import random
import pytest
2017-05-09 13:56:08 +00:00
TEST_DIR = pathlib.Path(__file__).parent
2017-05-09 14:32:23 +00:00
def relpath(*parts):
return TEST_DIR / pathlib.Path(*parts)
2017-05-12 11:40:27 +00:00
@pytest.fixture
def any_date():
return datetime.date.today() - datetime.timedelta(days=730 - random.randint(0, 365))