-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Running Integration Tests #1624
Comments
@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: #1464 (comment) |
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. |
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) |
I've seen this happen on python 3.7 and pytest 6.2.5 when I placed the skip marker decorator above a parametrized decorator (so, the root cause was not the python-pytest versions, but rather the decorator's order, which probably made a mess out of the test function name). I hope this is helpful. |
Description
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.
Steps to reproduce
I just forked, cloned, and set up a dev environment for this repository. I followed the instructions in the Development Guide to
make init
make pr
make integ-test
Observed result
____________________________________________________________________ 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__'
Expected result
Integration tests to run and pass on fresh environment
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: latest from repositoryThe text was updated successfully, but these errors were encountered: