@@ -1,6 +1,7 @@
Loading
1 1
# -*- coding: utf-8 -*-
2 2
from __future__ import unicode_literals
3 3
4 +
import re
4 5
from datetime import datetime, date
5 6
import unittest
6 7
from six import PY2, assertRaisesRegex
@@ -4615,12 +4616,13 @@
Loading
4615 4616
                             [datetime(1997, 1, 6)])
4616 4617
4617 4618
    def testRaisesCorrectErrorForUnsupportedProperty(self):
4618 -
        rule = "X-ABC-MMSUBJ:19970902T090000"
4619 -
        assertRaisesRegex(self, ValueError, "unsupported property", rrulestr, rule, dtstart=datetime(1997, 9, 2, 9, 0))
4619 +
        with pytest.raises(ValueError, match=re.escape("X-ABC-MMSUBJ")):
4620 +
            rrulestr("X-ABC-MMSUBJ:19970902T090000")
4620 4621
4621 4622
    def testRaisesCorrectErrorIfDatetimeContainsColons(self):
4622 4623
        rule = "FREQ=YEARLY;WKST=MO;UNTIL=2019-03-29T00:59:59"
4623 -
        self.assertRaises(ValueError, rrulestr, rule, dtstart=datetime(1997, 9, 2, 9, 0))
4624 +
        with pytest.raises(ValueError, match=re.escape(rule)):
4625 +
            rrulestr(rule)
4624 4626
4625 4627
4626 4628
@pytest.mark.rrule

@@ -1699,7 +1699,13 @@
Loading
1699 1699
                else:
1700 1700
                    if re.match("^[A-Za-z0-9-]+$", name):
1701 1701
                        raise ValueError("unsupported property: " + name)
1702 -
                    raise ValueError("RRULE line contains invalid colon or property: " + line)
1702 +
                    raise ValueError(
1703 +
                        "RRULE contains invalid property or stray colon:\n"
1704 +
                        + line + "\n\n"
1705 +
                        + "This commonly occurs when specifying a datetime "
1706 +
                        + "using delimiters, e.g. 2025-06-07T12:34:56; RFC "
1707 +
                        + "5545 requires datetimes specified with no "
1708 +
                        + "delimiters, e.g. 20250607T123456")
1703 1709
            if (forceset or len(rrulevals) > 1 or rdatevals
1704 1710
                    or exrulevals or exdatevals):
1705 1711
                if not parser and (rdatevals or exdatevals):
Files Coverage
dateutil 95.95%
Project Totals (32 files) 95.95%
macos-latest:pypy2
Build #232085303 -
2265.11
TRAVIS_PYTHON_VERSION=nightly
TRAVIS_OS_NAME=linux
TOXENV=py
windows-latest:pypy2
Build #232085303 -
macos-latest:pypy3
Build #232085303 -
xeafdjjbh56b3rtb
TOXENV=py35
windows-latest:pypy3
Build #232085303 -
lyvl0mcw5g4pwrd2
TOXENV=py37
82ocq4ur33uanlgn
TOXENV=py36
o6f43kusyww8w6rk
TOXENV=py38
mhgympc0dyq9qx2w
TOXENV=py37
2265.4
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py
2265.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
TOXENV=py
2265.2
TRAVIS_PYTHON_VERSION=3.4
TRAVIS_OS_NAME=linux
TOXENV=py
vlnusyk4ecl0hwik
TOXENV=py27
2265.5
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py
2265.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py
v8fp9ua2nhur58n6
TOXENV=py27
ubuntu-latest:pypy2
Build #232085303 -
ubuntu-latest:pypy3
Build #232085303 -
2265.6
TRAVIS_PYTHON_VERSION=3.8
TRAVIS_OS_NAME=linux
TOXENV=py
1
coverage:
2
  status:
3
    patch: false
4
    changes: false
5
    project:
6
      default:
7
        target: '80'
8

9
comment: false
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading