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

pantsbuild / pants / 6393
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: fix/prettier-output-files
DEFAULT BRANCH: main
Ran 24 Aug 2015 10:38PM UTC
Jobs 10
Files 373
Run time 11min
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
6393

push

travis-ci

jsirois
Ensure stdlib check uses normalized paths.

Previously, it was observed that the python __file__ might point to a
symlinked path whereas the `sysconfig.get_python_lib(standard_lib=1)`
path might be to the real path.  This led to mis-categorization of
stdlib imports as third party.  This fix ensures all paths are realpaths
to remove any ambiguity.

Also remove the unused PLAT_SPECIFIC_PATH.

Testing Done:
Before the fix got errors like:
```console
$ ./pants test tests/python/pants_test/backend/python/tasks/checkstyle -- -vktest_classify_import
...
   def test_classify_import():
     for index, (import_type, chunk) in enumerate(IMPORT_CHUNKS.items()):
       io = ImportOrder(PythonFile(chunk))
       import_chunks = list(io.iter_import_chunks())
       assert len(import_chunks) == 1
       module_types, chunk_errors = io.classify_imports(import_chunks[0])
       assert len(module_types) == 1
>       assert module_types.pop() == import_type, print('>>> [{}] type: {} chunk: {}'.format(index, import_type, chunk))
E       AssertionError: None
E       assert 5 == 1
E        +  where 5 = <built-in method pop of set object at 0x7ff8cf8814d8>()
E        +    where <built-in method pop of set object at 0x7ff8cf8814d8> = set([]).pop
```

This was on arch linux where:
```console
$ ls -l /usr/lib64
lrwxrwxrwx 1 root root 3 Feb 15  2015 /usr/lib64 -> lib
```

And debug prints revealed:
```console
>>> iter: 0 type: 1 chunk:
import ast
from collections import namedtuple
import io
>>> __file__: /usr/lib64/python2.7/ast.pyc stdlib: /usr/lib/python2.7
>>> __file__: /usr/lib64/python2.7/collections.pyc stdlib: /usr/lib/python2.7
>>> __file__: /usr/lib64/python2.7/io.pyc stdlib: /usr/lib/python2.7
```

CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/77063786

Bugs closed: 2005, 2054, 2059

Reviewed at https://rbcommons.com/s/twitter/r/2693/

16773 of 22427 relevant lines covered (74.79%)

1.41 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6393.1 (CI_FLAGS="-cjlpn 'Various pants self checks'") 24 Aug 2015 10:38PM UTC 0
Travis Job 6393.1
2 6393.2 (CI_FLAGS="-fkmsrcn -u 0/2 'Unit tests for pants and pants-plugins - shard 1'") 24 Aug 2015 10:40PM UTC 0
70.64
Travis Job 6393.2
3 6393.3 (CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'") 24 Aug 2015 10:41PM UTC 0
70.01
Travis Job 6393.3
4 6393.4 (CI_FLAGS="-fkmsrcjlp 'Python contrib tests'") 24 Aug 2015 10:38PM UTC 0
Travis Job 6393.4
5 6393.5 (CI_FLAGS="-fkmsrjlpn -i 0/6 'Python integration tests for pants - shard 1'") 24 Aug 2015 10:45PM UTC 0
Travis Job 6393.5
6 6393.6 (CI_FLAGS="-fkmsrjlpn -i 1/6 'Python integration tests for pants - shard 2'") 24 Aug 2015 10:44PM UTC 0
Travis Job 6393.6
7 6393.7 (CI_FLAGS="-fkmsrjlpn -i 2/6 'Python integration tests for pants - shard 3'") 24 Aug 2015 10:44PM UTC 0
Travis Job 6393.7
8 6393.8 (CI_FLAGS="-fkmsrjlpn -i 3/6 'Python integration tests for pants - shard 4'") 24 Aug 2015 10:46PM UTC 0
Travis Job 6393.8
9 6393.9 (CI_FLAGS="-fkmsrjlpn -i 4/6 'Python integration tests for pants - shard 5'") 24 Aug 2015 10:46PM UTC 0
Travis Job 6393.9
10 6393.10 (CI_FLAGS="-fkmsrjlpn -i 5/6 'Python integration tests for pants - shard 6'") 24 Aug 2015 10:50PM UTC 0
Travis Job 6393.10
Source Files on build 6393
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #6393
  • 318b423e on github
  • Prev Build on master (#6388)
  • Next Build on master (#6419)
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