You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
HitCounter Construct import syntax is incorrect, pytest will error attempting to find HitCounter in the cdk_workshop submodule.
Expected Behavior
Expected behavior is successful test run:
pytest
============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.12.0, pytest-6.2.5, py-1.11.0, pluggy-1.3.0
rootdir: /Users/phward/development/cdk_workshop
plugins: typeguard-2.13.3
collected 1 item
tests/unit/test_cdk_workshop_stack.py . [100%]
================================================================================ warnings summary ================================================================================
.venv/lib/python3.12/site-packages/dateutil/tz/tz.py:37
/Users/phward/development/cdk_workshop/.venv/lib/python3.12/site-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
EPOCH = datetime.datetime.utcfromtimestamp(0)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================== 1 passed, 1 warning in 2.58s ==========================================================================
Current Behavior
Currently pytest fails after initialy creating first assertion test as per workshop instructions:
pytest
============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.12.0, pytest-6.2.5, py-1.11.0, pluggy-1.3.0
rootdir: /Users/phward/development/cdk_workshop
plugins: typeguard-2.13.3
collected 0 items / 1 error
===================================================================================== ERRORS =====================================================================================
_____________________________________________________________ ERROR collecting tests/unit/test_cdk_workshop_stack.py _____________________________________________________________
ImportError while importing test module '/Users/phward/development/cdk_workshop/tests/unit/test_cdk_workshop_stack.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../.pyenv/versions/3.12.0/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_cdk_workshop_stack.py:7: in <module>
from cdk_workshop.hitcounter import HitCounter
E ModuleNotFoundError: No module named 'cdk_workshop.hitcounter'
================================================================================ warnings summary ================================================================================
.venv/lib/python3.12/site-packages/dateutil/tz/tz.py:37
/Users/phward/development/cdk_workshop/.venv/lib/python3.12/site-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
EPOCH = datetime.datetime.utcfromtimestamp(0)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
============================================================================ short test summary info =============================================================================
ERROR tests/unit/test_cdk_workshop_stack.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================== 1 warning, 1 error in 2.52s ===========================================================================
Reproduction Steps
Reproducable by implementing the initial DynamoDB assertion test in Python CDK Workshop
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
No response
Section
No response
Browser
No response
Language
No response
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2
Describe the bug
HitCounter Construct import syntax is incorrect, pytest will error attempting to find HitCounter in the cdk_workshop submodule.
Expected Behavior
Expected behavior is successful test run:
Current Behavior
Currently pytest fails after initialy creating first assertion test as per workshop instructions:
Reproduction Steps
Reproducable by implementing the initial DynamoDB assertion test in Python CDK Workshop
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
No response
Section
No response
Browser
No response
Language
No response
The text was updated successfully, but these errors were encountered: