811 subscribers
התחל במצב לא מקוון עם האפליקציה Player FM !
222: Import within a Python package
Manage episode 438672999 series 1952312
In this episode we're talking about importing part of a package into another part of the same package.
We'll look at: `from . import module` and `from .module import something`
and also: `import package` to access the external API from with the package.
Why would we use `import package` if `from . import api` would work fine?
Help support the show AND learn pytest:
- The Complete pytest course is now a bundle, with each part available separately.
- pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
- Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
- Then pytest Booster Rockets can help with advanced parametrization and building plugins.
- Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.
235 פרקים
Manage episode 438672999 series 1952312
In this episode we're talking about importing part of a package into another part of the same package.
We'll look at: `from . import module` and `from .module import something`
and also: `import package` to access the external API from with the package.
Why would we use `import package` if `from . import api` would work fine?
Help support the show AND learn pytest:
- The Complete pytest course is now a bundle, with each part available separately.
- pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
- Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
- Then pytest Booster Rockets can help with advanced parametrization and building plugins.
- Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.
235 פרקים
כל הפרקים
×

1 232: The role of AI in software testing - Anthony Shaw 58:07


1 228: pytest-md and pytest-md-report: Markdown reports for pytest 10:41


1 227: Mocking in Python with unittest.mock - Michael Foord 47:49


1 226: pytest-mock : Mocking in pytest 11:41


1 225: pytest-cov : The pytest plugin for measuring coverage 13:01


1 224: pytest plugins - a full series 12:51


1 223: Writing Stuff Down is a Super Power 22:03


1 222: Import within a Python package 13:00


1 220: Getting the most out of PyCon, including juggling - Rob Ludwick 41:09
ברוכים הבאים אל Player FM!
Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.