I am getting an AttributeError when attempting to run integration tests on this repository after following all instructions from the development guide.
Briefly describe the bug you are facing.
I just forked, cloned, and set up a dev environment for this repository. I followed the instructions in the Development Guide to
make initmake prmake integ-test____________________________________________________________________ ERROR collecting tests/integration/buildcmd/test_build_cmd.py _____________________________________________________________________
../../.pyenv/versions/3.7.2/lib/python3.7/unittest/loader.py:235: in getTestCaseNames
testFnNames = list(filter(shouldIncludeMethod, dir(testCaseClass)))
../../.pyenv/versions/3.7.2/lib/python3.7/unittest/loader.py:232: in shouldIncludeMethod
fullName = '%s.%s' % (testCaseClass.__module__, testFunc.__qualname__)
E AttributeError: 'MarkDecorator' object has no attribute '__qualname__'
Integration tests to run and pass on fresh environment
sam --version: latest from repository@beck3905 Thanks for the issue. My understanding is that this happens when there is an outdated unittest and or pytest on the system. A couple things you can try:
Let me know if any of that works. There are some additional details here as well: https://github.com/awslabs/aws-sam-cli/pull/1464#issuecomment-545447568
Closing as this is not a code bug. Feel free to reopen if you need help
@sanathkr I disagree. This may not be a bug with the application code, but I am still unable to successfully run integration tests on a brand new dev environment created from a newly forked version of this repository and following the Development Guide. That suggests that this is a bug in the Development Guide and the repository may not work as described in the Development Guide.
@jfuss I tried with different Python versions including 3.6.8 and 3.7.5 and I get different errors and still fail to run integration tests. One of the errors I saw was an import error for tomlkit despite seeing tomlkit installed in my virtualenv. All of my unit tests are passing and I have been able to successfully run samdev on a template on my local machine in my virtualenv.
@beck3905 Something is not right on your system then. You are probably getting resolved to a different python interpreter than the one you are expecting.
Same problem here. OSX, Installed pyenv and and other instructions in developer guide.
Python 3.7.2
Pytest 5.2.1
I had the same issue. Solved creating a new environment for samcli37 with python 3.7.5.
Thanks @francilioaraujo - I installed python 3.7.5 and setup a new venv and the integration tests now run. (Previous venv was 3.7.2)