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

noahmorrison / chevron / 32
99%

Build:
DEFAULT BRANCH: master
Ran 16 Jan 2015 04:05PM UTC
Jobs 5
Files 5
Run time 38s
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
32

push

travis-ci

noahmorrison
Tokens needs to be a generator, not a list.

At first I thought they were pretty much the same thing.
But generators pick up from where they left off,
while lists don't.

This fixes the edge-case infinite loop
that was happening last commit.

from the python repl

Lists
>>> data = [1,2,3,4,5]
>>> for i in data:
...     print(i)
...     if i == 2:
...         for ii in data:
...             print('>', ii)
...             if ii == 4:
...                 break
...
1
2
> 1
> 2
> 3
> 4
3
4
5

Generators
>>> data = [1,2,3,4,5]
>>> gen = (d for d in data)
>>> for i in gen:
...     print(i)
...     if i == 2:
...         for ii in gen:
...             print('>', ii)
...             if ii == 4:
...                 break
...
1
2
> 3
> 4
5

238 of 246 relevant lines covered (96.75%)

4.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32.1 16 Jan 2015 04:05PM UTC 0
94.31
Travis Job 32.1
2 32.2 16 Jan 2015 04:05PM UTC 0
94.31
Travis Job 32.2
3 32.3 16 Jan 2015 04:05PM UTC 0
96.75
Travis Job 32.3
4 32.4 16 Jan 2015 04:05PM UTC 0
96.75
Travis Job 32.4
5 32.5 16 Jan 2015 04:05PM UTC 0
96.75
Travis Job 32.5
Source Files on build 32
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #32
  • 7f371e7e on github
  • Prev Build on master (#31)
  • Next Build on master (#33)
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