From 451f049ec75686fe175da1f58e9fe093a4346d5d Mon Sep 17 00:00:00 2001 From: manatlan Date: Tue, 12 Dec 2023 19:43:46 +0100 Subject: [PATCH] fix manul tests (with venv too) --- manual_tests_base.py | 2 +- manual_tests_events.py | 2 +- manual_tests_htbulma.py | 1 + manual_tests_new_InternalCall.py | 2 +- manual_tests_persitent.py | 11 ++++++++++- manual_tests_qp.py | 1 + manual_tests_remove.py | 3 ++- 7 files changed, 17 insertions(+), 5 deletions(-) diff --git a/manual_tests_base.py b/manual_tests_base.py index 72a17f1..fc15170 100644 --- a/manual_tests_base.py +++ b/manual_tests_base.py @@ -1,4 +1,4 @@ -import sys +#!./venv/bin/python3 from htag import Tag # the only thing you'll need ;-) diff --git a/manual_tests_events.py b/manual_tests_events.py index 8185f5b..4cd34ea 100644 --- a/manual_tests_events.py +++ b/manual_tests_events.py @@ -1,4 +1,4 @@ -import sys +#!./venv/bin/python3 from htag import Tag # the only thing you'll need ;-) def nimp(obj): diff --git a/manual_tests_htbulma.py b/manual_tests_htbulma.py index f56d73d..12d13b1 100644 --- a/manual_tests_htbulma.py +++ b/manual_tests_htbulma.py @@ -1,3 +1,4 @@ +#!./venv/bin/python3 from htag import Tag import htbulma as b diff --git a/manual_tests_new_InternalCall.py b/manual_tests_new_InternalCall.py index f52553c..5027591 100644 --- a/manual_tests_new_InternalCall.py +++ b/manual_tests_new_InternalCall.py @@ -1,4 +1,4 @@ -import sys +#!./venv/bin/python3 from htag import Tag # the only thing you'll need ;-) diff --git a/manual_tests_persitent.py b/manual_tests_persitent.py index 3964bce..6375ea0 100644 --- a/manual_tests_persitent.py +++ b/manual_tests_persitent.py @@ -1,6 +1,14 @@ -import sys +#!./venv/bin/python3 from htag import Tag # the only thing you'll need ;-) +class Nimp(Tag.div): + def init(self): + # !!! previous3 will not be saved in '/tmp/AEFFFF.json' !!! + # (it's not the main/managed tag (which is Page), so it's an inner dict) + self.state["previous3"]=self.state.get("previous3","") + "!" + self.set( self.state["previous3"] ) + + class Page(Tag.body): def init(self): self.session["previous"]=self.session.get("previous","") + "!" @@ -8,6 +16,7 @@ def init(self): self+=Tag.div( self.session["previous"] ) self+=Tag.div( self.state["previous2"] ) + self+=Nimp() # from htag.runners import DevApp as Runner diff --git a/manual_tests_qp.py b/manual_tests_qp.py index a11cef0..d0954d3 100644 --- a/manual_tests_qp.py +++ b/manual_tests_qp.py @@ -1,3 +1,4 @@ +#!./venv/bin/python3 # -*- coding: utf-8 -*- from htag import Tag diff --git a/manual_tests_remove.py b/manual_tests_remove.py index 292ba31..b33be4a 100644 --- a/manual_tests_remove.py +++ b/manual_tests_remove.py @@ -1,4 +1,5 @@ -import sys +#!./venv/bin/python3 +# -*- coding: utf-8 -*- from htag import Tag # the only thing you'll need ;-)