Go offline with the Player FM app!
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 episodes
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 episodes
All episodes
×
1 pytest-metadata - provides access to test session metadata 8:15

1 pytest-check - allow multiple failures per test 9:56

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

1 pytest-html - a plugin that generates HTML reports for test results 6:49

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

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

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

1 221: How to get pytest to import your code under test 8:18

1 220: Getting the most out of PyCon, including juggling - Rob Ludwick 41:09
Welcome to Player FM!
Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.