Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc/update interactive & assertions doc #1127

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions doc/en/interactive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ circumstances.
* ``__main__`` module (i.e. test_plan.py) cannot be reloaded. Because of this,
it is recommended that test suites are defined in seperate modules. It is a
good idea to keep the main script simple.
* Testplan is not able to reload module that is under *Namespace Package*, the
workaround is to add dummy __init__.py file.
* Testplan is not able to reload module that is under **Namespace Package**, the
workaround is to add dummy ``__init__.py`` file.
* Unlike testcases that can be added/removed/modified, adding/removing/renaming
testsuite class will not take effect after reloading.
* Modules or objects imported using ``from some_module import *`` syntax are
Expand All @@ -73,6 +73,12 @@ circumstances.
* In interactive mode, all modules containing test targets will be loaded at
the same time, if the modules from which tasks are scheduled have the same
name, they won't be reloaded properly.
* `modulefinder.ModuleFinder <https://docs.python.org/3/library/modulefinder.html#modulefinder.ModuleFinder>`_
works purely on static analysis, which means it is completely ignorant of any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's explain in a bit more detail how module finder find the dependency of the module from import statement:

  • absolute import if the module path is accessible from the root (pwd)? (e.g import a.b.c, and if a is under root syspath)
  • relative import if the module path is reachable from current module (e.g import ..x.y, if we can traverse to x from current module)

run this through co-pilot for refinement

programmatic imports as well as imports requiring ``sys.path`` manipulation.
As a result, such dependencies may not be reloaded. In these cases, user may
need to use the ``extra_deps`` parameter of the ``@test_plan`` decorator to
specify these dependencies.


.. _Interactive_UI:
Expand Down