@@ -4913,18 +4913,16 @@
Loading
4913 4913
        for repstr, wday in zip(with_n_reprs, with_n_wdays):
4914 4914
            self.assertEqual(repr(wday), repstr)
4915 4915
4916 -
    def testUnsupportedRuleErrorWhenTimeFormatIsNotCorrect(self):
4916 +
    def testMalformedRuleErrorWhenTimeFormatIsNotCorrect(self):
4917 4917
        rule = "FREQ=YEARLY;WKST=MO;UNTIL=2019-03-29T00:59:59+01:00"
4918 4918
        with pytest.raises(ValueError) as exception:
4919 4919
            rrulestr(rule, dtstart=datetime(1997, 9, 2, 9, 0))
4920 -
        self.assertEqual("Unsupported rule: " + rule + ". Check if property is supported and time format does not have "
4921 -
                                                       "delimiters according to RFC5545",
4920 +
        self.assertEqual("Malformed rule: " + rule,
4922 4921
                         str(exception.value))
4923 4922
4924 -
    def testUnsupportedRuleErrorWhenRuleNameIsNotCorrect(self):
4923 +
    def testUnsupportedPropertyErrorWhenRuleNameIsNotCorrect(self):
4925 4924
        rule = "XYZ:19970902T090000"
4926 4925
        with pytest.raises(ValueError) as exception:
4927 4926
            rrulestr(rule, dtstart=datetime(1997, 9, 2, 9, 0))
4928 -
        self.assertEqual("Unsupported rule: " + rule + ". Check if property is supported and time format does not have "
4929 -
                                                       "delimiters according to RFC5545",
4927 +
        self.assertEqual("unsupported property: " + "XYZ",
4930 4928
                         str(exception.value))

@@ -1670,7 +1670,10 @@
Loading
1670 1670
                    raise ValueError("empty property name")
1671 1671
                name = parms[0]
1672 1672
                parms = parms[1:]
1673 -
                if name == "RRULE":
1673 +
                valid_name_pattern = re.compile("^[A-Z]+$")
1674 +
                if not valid_name_pattern.match(name):
1675 +
                    raise ValueError("Malformed rule: " + line)
1676 +
                elif name == "RRULE":
1674 1677
                    for parm in parms:
1675 1678
                        raise ValueError("unsupported RRULE parm: "+parm)
1676 1679
                    rrulevals.append(value)
@@ -1697,9 +1700,7 @@
Loading
1697 1700
                                         value)
1698 1701
                    dtstart = dtvals[0]
1699 1702
                else:
1700 -
                    raise ValueError("Unsupported rule: " + s + ". Check if property is supported and time "
1701 -
                                                                "format does not have delimiters "
1702 -
                                                                "according to RFC5545")
1703 +
                    raise ValueError("unsupported property: " + name)
1703 1704
            if (forceset or len(rrulevals) > 1 or rdatevals
1704 1705
                    or exrulevals or exdatevals):
1705 1706
                if not parser and (rdatevals or exdatevals):
Files Coverage
dateutil 96.01%
Project Totals (32 files) 96.01%
macos-latest:pypy3
Build #185221073 -
2232.11
TRAVIS_PYTHON_VERSION=nightly
TRAVIS_OS_NAME=linux
TOXENV=py
windows-latest:pypy3
Build #185221073 -
windows-latest:pypy2
Build #185221073 -
f28s8kyjffxtmbp4
TOXENV=py36
a0jaqi6q7roq9rmb
TOXENV=py35
bke52x6kr3qh7i2h
TOXENV=py37
macos-latest:pypy2
Build #185221073 -
iufxedssycfjmbiw
TOXENV=py38
mcw5uwv6t3f3l4i8
TOXENV=py37
2232.4
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
TOXENV=py
2232.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
TOXENV=py
2232.5
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
TOXENV=py
4pu6e65wo65bkkx9
TOXENV=py27
2232.2
TRAVIS_PYTHON_VERSION=3.4
TRAVIS_OS_NAME=linux
TOXENV=py
2232.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
TOXENV=py
ubuntu-latest:pypy2
Build #185221073 -
ubuntu-latest:pypy3
Build #185221073 -
2232.6
TRAVIS_PYTHON_VERSION=3.8
TRAVIS_OS_NAME=linux
TOXENV=py
86entwuydx1cbkqj
TOXENV=py38
03n5q3ndps7vi8qk
TOXENV=py27
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