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

pantsbuild / pants / 5601
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: upgrade-hdr-histogram
DEFAULT BRANCH: main
Ran 11 Jul 2015 02:56PM UTC
Jobs 10
Files 335
Run time 7min
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
5601

push

travis-ci

John Sirois
Fix test_execute_fail.

This fixes test_execute, but not the underlying global state used in
DummyTask.  Its that state, that appears to have supported a successful
run under certain sharding / test method ordering, although I was not
able to positively identify a sequence of calls that would lead to
test_execute ever passing.

In particular, it had 2 local errors that look systemic:

1. The raises regex did not escape the parens.
   Before this fix, the regex only could match 'Failed to generate
   targets' - with 's' being in an unused capture group.
2. The assertRaisesRegexp callable argument was not a callable.
   The _result_ of task.execute() was passed instead of the task.execute
   method.

These system errors were in addition to the lack of setup of the global
strategy explicitly.  That strategy is needed to ensure DummyGen's
execute_codegen is called leading to the raise.  Using the isolated
strategy (which was the default) with no targets short circuits the
execute_codegen call, failing to ever engage the `should_fail` forced
raise.

Testing Done:
Before:
```console
$ ./pants test tests/python/pants_test/backend/codegen/tasks:simple_codegen_task
...
tests/python/pants_test/backend/codegen/tasks/test_simple_codegen_task.py .....F.

==================== FAILURES ====================
____ SimpleCodegenTaskTest.test_execute_fail _____

self = <test_simple_codegen_task.SimpleCodegenTaskTest testMethod=test_execute_fail>

   def test_execute_fail(self):
     task = self._create_dummy_task()
     task.should_fail = True
>     self.assertRaisesRegexp(TaskError, 'Failed to generate target(s)', task.execute())
E     TypeError: 'NoneType' object is not callable

tests/python/pants_test/backend/codegen/tasks/test_simple_codegen_task.py:126: TypeError
...
```

After - success.

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

Bugs closed: 1794

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

14122 of 20000 relevant lines covered (70.61%)

1.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5601.1 (CI_FLAGS="-cjlpn 'Various pants self checks'") 11 Jul 2015 02:57PM UTC 0
Travis Job 5601.1
2 5601.2 (CI_FLAGS="-fkmsrcn -u 0/2 'Unit tests for pants and pants-plugins - shard 1'") 11 Jul 2015 02:56PM UTC 0
66.3
Travis Job 5601.2
3 5601.3 (CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'") 11 Jul 2015 02:56PM UTC 0
66.53
Travis Job 5601.3
4 5601.4 (CI_FLAGS="-fkmsrcjlp 'Python contrib tests'") 11 Jul 2015 02:56PM UTC 0
Travis Job 5601.4
5 5601.5 (CI_FLAGS="-fkmsrjlpn -i 0/6 'Python integration tests for pants - shard 1'") 11 Jul 2015 02:57PM UTC 0
Travis Job 5601.5
6 5601.6 (CI_FLAGS="-fkmsrjlpn -i 1/6 'Python integration tests for pants - shard 2'") 11 Jul 2015 03:02PM UTC 0
Travis Job 5601.6
7 5601.7 (CI_FLAGS="-fkmsrjlpn -i 2/6 'Python integration tests for pants - shard 3'") 11 Jul 2015 03:01PM UTC 0
Travis Job 5601.7
8 5601.8 (CI_FLAGS="-fkmsrjlpn -i 3/6 'Python integration tests for pants - shard 4'") 11 Jul 2015 03:03PM UTC 0
Travis Job 5601.8
9 5601.9 (CI_FLAGS="-fkmsrjlpn -i 4/6 'Python integration tests for pants - shard 5'") 11 Jul 2015 03:01PM UTC 0
Travis Job 5601.9
10 5601.10 (CI_FLAGS="-fkmsrjlpn -i 5/6 'Python integration tests for pants - shard 6'") 11 Jul 2015 03:02PM UTC 0
Travis Job 5601.10
Source Files on build 5601
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5601
  • f17710cf on github
  • Prev Build on master (#5598)
  • Next Build on master (#5602)
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