Decorator to call the addition methods. This will call a function which adds at least one new entry into the `cases` dictionary. The decorator will also assert that something was added to the dictionary.
(f)
| 1236 | # The decorator for calling is used to make it more obvious that each |
| 1237 | # function is actually called (if it's not decorated, it's not called). |
| 1238 | def call(f): |
| 1239 | """Decorator to call the addition methods. |
| 1240 | |
| 1241 | This will call a function which adds at least one new entry into |
| 1242 | the `cases` dictionary. The decorator will also assert that |
| 1243 | something was added to the dictionary. |
| 1244 | """ |
| 1245 | prev_len = len(cases) |
| 1246 | f() |
| 1247 | assert len(cases) > prev_len, "Function did not add a test case!" |
| 1248 | |
| 1249 | NORMAL = cls.NORMAL |
| 1250 | FOLD = cls.FOLD |
no test coverage detected