pact-foundation / pact-python

Python version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
http://pact.io
MIT License
573 stars 138 forks source link

`make e2e` fails on one badly indented test case #56

Closed jceplaras closed 7 years ago

jceplaras commented 7 years ago

Running make e2e on https://github.com/pact-foundation/pact-python/commit/5f8257b6f7f19800be97999b865a3c644e5c7052 fails by default on Python 3.6

bash -c "$E2E"
[2017-10-13 12:45:41] INFO  WEBrick 1.3.1
[2017-10-13 12:45:41] INFO  ruby 2.2.2 (2015-04-13) [x86_64-linux]
[2017-10-13 12:45:41] INFO  WEBrick::HTTPServer#start: pid=4208 port=1234
.WARN: No content type found, performing text diff on body
.WARN: No content type found, performing text diff on body
.WARN: No content type found, performing text diff on body
...E
======================================================================
ERROR: test_incorrect_number_of_arguments (test_e2e.SyntaxErrors)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jceplaras/Projects/pact-python/e2e/contracts/test_e2e.py", line 161, in test_incorrect_number_of_arguments
    e.exception.message, 'two() takes exactly 2 arguments (1 given)')
AttributeError: 'TypeError' object has no attribute 'message'
-------------------- >> begin captured logging << --------------------
requests.packages.urllib3.connectionpool: DEBUG: Starting new HTTP connection (1): localhost
requests.packages.urllib3.connectionpool: DEBUG: http://localhost:1234 "DELETE /interactions HTTP/1.1" 200 20
requests.packages.urllib3.connectionpool: DEBUG: Starting new HTTP connection (1): localhost
requests.packages.urllib3.connectionpool: DEBUG: http://localhost:1234 "PUT /interactions HTTP/1.1" 200 16
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 7 tests in 0.844s

FAILED (errors=1)

Writing pact for provider to ./pacts/consumer-provider.json
[2017-10-13 12:45:41] INFO  going to shutdown ...
[2017-10-13 12:45:41] INFO  WEBrick::HTTPServer#start done.
make: *** [Makefile:56: e2e] Error 1

I would also like to fix this. :)

jceplaras commented 7 years ago

Also, with this fix, i think there's no more reason to disable e2e tests on the CI for other versions