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

susam / ice / 16
100%

Build:
DEFAULT BRANCH: master
Ran 19 Dec 2015 06:58AM UTC
Jobs 1
Files 14
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

pending completion
16

push

travis-ci

susam
Fix coverage test failure with Python 3.3

In Python 3.3, the __file__ attribute of an imported module is
not an absolute path. This causes one of the tests to fail
during code coverage tests.

The failing test is IceTest.test_static_avoid_403_error(). It
relies on test.data module to get the path to a test data file
foo.txt.

    @app.get('/')
    def foo():
        return app.static('/', data.filepath('foo.txt'))

The test.data module determines its dirpath attribute to be
./test/data and thus it returns ./test/data/foo.txt as the path
to the test data file. This when joined with / results in
/test/data/foo.txt. The app.static() method fails to find a file
at this location because the actual location of the file is
test/data/foo.txt relative to the base of the project directory.
This results in a '404 Not Found' response instead of the
expected '200 OK' response. This causes a test failure.

This issue does not occur in Python 3.4 because in this version,
the __file__ attribute of an imported module contains absolute
path. Here are a few references for this fact.

  - https://docs.python.org/3.4/whatsnew/3.4.html#other-language-changes
  - https://bugs.python.org/issue18416

Fix this issue for Python 3.3 by ensuring that the dirpath
attribute of test.data module is always an absolute path by
using os.path.abspath() function call on the determined path.

1590 of 1590 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 16.1 19 Dec 2015 06:58AM UTC 0
100.0
Travis Job 16.1
Source Files on build 16
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #16
  • d7540c65 on github
  • Prev Build on master (#15)
  • Next Build on master (#17)
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