Esempio n. 1
0
def test_read_invalid():
    reader = Reader()
    local_path = os.path.join(os.path.split(__file__)[0], '..')
    tz_file = os.path.join(local_path, 'fixtures', 'tz', 'NOT_A_TIMEZONE')

    with pytest.raises(InvalidZoneinfoFile):
        reader.read(tz_file)
Esempio n. 2
0
def test_read_invalid():
    reader = Reader()
    local_path = os.path.join(os.path.split(__file__)[0], "..")
    tz_file = os.path.join(local_path, "fixtures", "tz", "NOT_A_TIMEZONE")

    with pytest.raises(InvalidZoneinfoFile):
        reader.read(tz_file)
Esempio n. 3
0
def test_read():
    reader = Reader()
    local_path = os.path.join(os.path.split(__file__)[0], '..', '..')
    tz_file = os.path.join(local_path, 'fixtures', 'tz', 'Paris')
    tz = reader.read(tz_file)

    assert len(tz.transitions) > 0
Esempio n. 4
0
def test_read():
    reader = Reader()
    local_path = os.path.join(os.path.split(__file__)[0], "..", "..")
    tz_file = os.path.join(local_path, "fixtures", "tz", "Paris")
    tz = reader.read(tz_file)

    assert len(tz.transitions) > 0