• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

maxtepkeev / python-redmine / 317

pending completion
317

push

travis-ci-com

maxtepkeev
version bump

1 of 1 new or added line in 1 file covered. (100.0%)

1366 of 1366 relevant lines covered (100.0%)

8.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/redminelib/lookups.py
1
"""
2
Defines lookup classes to be used in ResultSet's filter method.
3
"""
4

5
registry = {}
8✔
6

7

8
class Lookup:
8✔
9
    lookup_name = None
8✔
10

11
    def __init_subclass__(cls, **kwargs):
8✔
12
        super().__init_subclass__(**kwargs)
8✔
13
        registry[cls.lookup_name] = cls()
8✔
14

15
    def __call__(self, resource_value, requested_value):
8✔
16
        raise NotImplementedError
8✔
17

18

19
class Exact(Lookup):
8✔
20
    lookup_name = 'exact'
8✔
21

22
    def __call__(self, resource_value, requested_value):
8✔
23
        return resource_value == requested_value
8✔
24

25

26
class In(Lookup):
8✔
27
    lookup_name = 'in'
8✔
28

29
    def __call__(self, resource_value, requested_values):
8✔
30
        return resource_value in requested_values
8✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc