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

cn / GB2260.py / 41 / 3
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 19 May 2020 07:17PM UTC
Files 4
Run time 1s
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

19 May 2020 07:16PM UTC coverage: 100.0%. Remained the same
41.3

push

travis-ci

tonyseek
fix cache KeyError when garbage collected

WeakValueDictionary cache may get garbage collected, so the test "if key in cache" is not safe.
Let's test it on the fly.

Here is the exception happened to me:

  File "algo.py", line 64, in search
    if check_identity(id):
  File "algo.py", line 30, in check_identity
    division = gb2260.get(region)
  File "/opt/pypy3/site-packages/gb2260/division.py", line 59, in get
    return cache[key]
  File "/opt/pypy3/lib-python/3/weakref.py", line 159, in __getitem__
    raise KeyError(key)
KeyError: 621121

90 of 90 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 41.3
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 39
  • Travis Job 41.3
  • 7ae5e5d0 on github
  • Prev Job for on master (#39.1)
  • Next Job for on master (#43.1)
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