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

alecthomas / injector / 424
94%
master: 96%

Build:
Build:
LAST BUILD BRANCH: add_requirements_and_requirements_dev
DEFAULT BRANCH: master
Ran 10 Dec 2019 12:32AM UTC
Jobs 3
Files 2
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
424

push

travis-ci

jstasiak
Fix a BoundKey UnknownProvider regression

The example of an error this regression caused:

    1302 A BoundKey provides a key to a type with pre-injected arguments.
    1303
    1304     >>> class A:
    1305     ...   def __init__(self, a, b):
    1306     ...     self.a = a
    1307     ...     self.b = b
    1308     >>> InjectedA = BoundKey(A, a=InstanceProvider(1), b=InstanceProvider(2))
    1309     >>> injector = Injector()
    1310     >>> a = injector.get(InjectedA)
    UNEXPECTED EXCEPTION: UnknownProvider("couldn't determine provider for InstanceProvider(1) to None")
    Traceback (most recent call last):
      File "/Users/user/projects/injector/injector/__init__.py", line 583, in get_binding
        return self._get_binding(interface, only_this_binder=is_scope)
      File "/Users/user/projects/injector/injector/__init__.py", line 578, in _get_binding
        raise KeyError
    KeyError

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
        compileflags, 1), test.globs)
      File "<doctest injector.BoundKey[3]>", line 1, in <module>
      File "/Users/user/projects/injector/injector/__init__.py", line 864, in get
        result = scope_instance.get(interface, binding.provider).get(self)
      File "/Users/user/projects/injector/injector/__init__.py", line 289, in get
        return injector.call_with_injection(self._callable)
      File "/Users/user/projects/injector/injector/__init__.py", line 918, in call_with_injection
        owner_key=self_.__class__ if self_ is not None else callable.__module__,
      File "/Users/user/projects/injector/injector/__init__.py", line 80, in wrapper
        return function(*args, **kwargs)
      File "/Users/user/projects/injector/injector/__init__.py", line 959, in args_to_inject
        instance = self.get(... (continued)

300 of 330 branches covered (90.91%)

Branch coverage included in aggregate %.

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

958 of 1014 relevant lines covered (94.48%)

2.83 hits per line

Jobs
ID Job ID Ran Files Coverage
3 424.3 10 Dec 2019 12:32AM UTC 0
93.83
Travis Job 424.3
4 424.4 10 Dec 2019 12:33AM UTC 0
93.98
Travis Job 424.4
7 424.7 10 Dec 2019 12:34AM UTC 0
93.98
Travis Job 424.7
Source Files on build 424
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #424
  • 6c39860f on github
  • Prev Build on test2 (#420)
  • Next Build on test2 (#426)
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

© 2026 Coveralls, Inc