automationpanda / tau-intro-to-pytest Goto Github PK
View Code? Open in Web Editor NEWIntroduction to pytest: A Test Automation University Course
Home Page: https://testautomationu.applitools.com/pytest-tutorial/
License: Apache License 2.0
Introduction to pytest: A Test Automation University Course
Home Page: https://testautomationu.applitools.com/pytest-tutorial/
License: Apache License 2.0
After diff-checking and confirming that my code & file structure was 1:1 with Pandy Knight's, im left thinking an error is introduced within the chapter 5 section, at the accumulator class' import statement in the /test_accum.py file
from stuff.accum import Accumulator
Either that, or PyCharm (2023.2.2 (Community Edition)) or Python (v3.12.0) dislikes how im attempting to import the Accumulator class from the stuff directory. After attempts to resolve it failed I pulled down the course repo and called python3 -m pytest -v test_accum.py
on the repo version to be greeted with the same error:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ERROR collecting test_accum.py _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ImportError while importing test module '/PycharmProjects/test-automation-university/venv/tau-pytest/tests/test_accum.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test_accum.py:2: in <module>
from stuff.accum import Accumulator
E ModuleNotFoundError: No module named 'stuff'
Since im new to it, I considered that PyCharm did some virtual environment or PATHing oddness(?), though this was also the errored outcome when I used another IDE like VSC.
If any additional info is needed i'll do my best to provide it.
[Screenshot below was taken while troubleshooting with a duplicate file, creatively named 'stuff2']
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.