()
| 135 | |
| 136 | |
| 137 | def test_pattern_priority(): |
| 138 | matchers = [ |
| 139 | URLPattern("all://"), |
| 140 | URLPattern("http://"), |
| 141 | URLPattern("http://example.com"), |
| 142 | URLPattern("http://example.com:123"), |
| 143 | ] |
| 144 | random.shuffle(matchers) |
| 145 | assert sorted(matchers) == [ |
| 146 | URLPattern("http://example.com:123"), |
| 147 | URLPattern("http://example.com"), |
| 148 | URLPattern("http://"), |
| 149 | URLPattern("all://"), |
| 150 | ] |