Skip to content

Commit

Permalink
do not reload compilation if using local app in AppHarness (#3790)
Browse files Browse the repository at this point in the history
* do not reload if using local app

* Update reflex/testing.py

Co-authored-by: Masen Furer <m_github@0x26.net>

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
  • Loading branch information
Lendemor and masenf authored Aug 13, 2024
1 parent 910bcdb commit 634c091
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reflex/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ def _initialize_app(self):
before_decorated_pages = reflex.app.DECORATED_PAGES[self.app_name].copy()
# Ensure the AppHarness test does not skip State assignment due to running via pytest
os.environ.pop(reflex.constants.PYTEST_CURRENT_TEST, None)
self.app_module = reflex.utils.prerequisites.get_compiled_app(reload=True)
self.app_module = reflex.utils.prerequisites.get_compiled_app(
# Do not reload the module for pre-existing apps (only apps generated from source)
reload=self.app_source is not None
)
# Save the pages that were added during testing
self._decorated_pages = [
p
Expand Down

0 comments on commit 634c091

Please sign in to comment.