222: Import within a Python package
Listen now
Description
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?  Learn pytest pytest is the number one test framework for Python.Learn the basics super fast with Hello, pytest!Then later you can become a pytest expert with The Complete pytest CourseBoth courses are at courses.pythontest.com
More Episodes
Taking notes well can help to listen better, remember things, show respect, be more accountable, free up mind space to solve problems. This episode discusses the benefits of writing things downpreparing for a meetingtaking notes in meetingsreviewing notes for action items, todo items, things to...
Published 11/17/24
Published 09/07/24
We've got some code we want to test, and some tests.The tests need to be able to import the code under test, or at least the API to it, in order to run tests against it.How do we do that? How do we set things up so that our tests can import our code? In this episode, we discuss two...
Published 06/03/24