Loading ...
Sorry, an error occurred while loading the content.

[Cheetahtemplate-discuss] cheetah test failed

Expand Messages
  • Dirk Hoffmann
    Hello Tavis, thanks for the prompt reaction. I ve tried 0.9.15rc2. See attached test.log. 3 E s left but no F s the distinction of which I do not know yet.
    Message 1 of 9 , Mar 25 9:11 AM
    • 0 Attachment
      Hello Tavis,

      thanks for the prompt reaction. I've tried 0.9.15rc2. See attached
      test.log. 3 E's left but no F's the distinction of which I do not know yet.

      regards
      Dirk Hoffmann
    • mso@oz.net
      ... F means the test failed; i.e., AssertionError. E means the test raised another exception. The tests are written to raise AssertionError if something
      Message 2 of 9 , Mar 25 10:49 AM
      • 0 Attachment
        Dirk wrote:
        > thanks for the prompt reaction. I've tried 0.9.15rc2. See attached
        > test.log. 3 E's left but no F's the distinction of which I do not know
        > yet.

        'F' means the test failed; i.e., AssertionError. 'E' means the test
        raised another exception. The tests are written to raise AssertionError
        if something is true (or isn't true). For most tests, that means
        whether the template output equals the expected output. If another
        exception occurs, the testing program doesn't know what to do, so it
        just aborts.

        The tests are actually tripled to handle the three end-of-line
        conventions (Unix LF, Windows CR+LF, Mac CR), so the "three" errors you
        got are really one error replicated. '#extends' is trying to implicitly
        import SampleBaseClass.py, which it's not finding. I'm at PyCon on a
        borrowed
        computer, so I can't analyze from here why that's happening.





        -------------------------------------------------------
        This SF.net email is sponsored by:
        The Definitive IT and Networking Event. Be There!
        NetWorld+Interop Las Vegas 2003 -- Register today!
        http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Tavis Rudd
        Hi Dirk, what directory are you running the tests from? Can you comment out the tearDown() method for that test class on line 1950 of
        Message 3 of 9 , Mar 25 10:59 AM
        • 0 Attachment
          Hi Dirk,
          what directory are you running the tests from?

          Can you comment out the tearDown() method for that test class on line 1950 of
          Cheetah/src/Tests/SyntaxAndOutput.py and check to see if a file called
          SampleBaseClass.py has been created in it. Line 1943 of
          Cheetah/src/Tests/SyntaxAndOutput.py creates that file and the test case that
          is failing attempts to import it.

          Cheers,
          Tavis

          On Tuesday 25 March 2003 09:11, Dirk Hoffmann wrote:
          > Hello Tavis,
          >
          > thanks for the prompt reaction. I've tried 0.9.15rc2. See attached
          > test.log. 3 E's left but no F's the distinction of which I do not know yet.
          >
          > regards
          > Dirk Hoffmann



          -------------------------------------------------------
          This SF.net email is sponsored by:
          The Definitive IT and Networking Event. Be There!
          NetWorld+Interop Las Vegas 2003 -- Register today!
          http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        • Tracy S. Ruggles
          Hi all, I m trying to instantiate a template ahead of time with a placeholder dictionary inserted into the search list (within a webware servlet). Does anyone
          Message 4 of 9 , Mar 25 11:13 AM
          • 0 Attachment
            Hi all,

            I'm trying to instantiate a template ahead of time with a placeholder
            dictionary inserted into the search list (within a webware servlet).
            Does anyone see a problem with this setup as far as thread-safety is
            concerned. Or, is the cost of instantiating a template so minimal that
            doing it this way is overkill?

            #-----\\\ BEGIN widget.tmpl
            My name is '$name'... ($description)
            #-----/// END

            #-----\\\ BEGIN Test.py
            from WebKit.Page import Page
            from widget import widget

            class Test(Page):
            def __init__ (self):
            Page.__init__ (self)
            self.tempData = {}
            self.origData = {'name':'Test', 'description':'a test page'}
            self.widget = widget(searchList=[self.tempData])
            def getDynamicData(self):
            # do something more interesting with the field data
            return self.request().fields()
            def awake (self, transaction):
            Page.awake(self, transaction)
            self.tempData.update(self.origData)
            self.tempData.update(self.getDynamicData())
            def sleep (self, transaction):
            self.tempData.clear()
            Page.sleep(self, transaction)
            def writeContent(self):
            self.write(str(self.widget))
            #-----/// END



            -------------------------------------------------------
            This SF.net email is sponsored by:
            The Definitive IT and Networking Event. Be There!
            NetWorld+Interop Las Vegas 2003 -- Register today!
            http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
            _______________________________________________
            Cheetahtemplate-discuss mailing list
            Cheetahtemplate-discuss@...
            https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
          • Tavis Rudd
            Hi Tracy, I use almost exactly the same pattern and it works great for me. Cheers, Tavis ... This SF.net email is sponsored by: The Definitive IT and
            Message 5 of 9 , Mar 25 11:22 AM
            • 0 Attachment
              Hi Tracy,
              I use almost exactly the same pattern and it works great for me.
              Cheers,
              Tavis

              On Tuesday 25 March 2003 11:13, Tracy S.Ruggles wrote:
              > Hi all,
              >
              > I'm trying to instantiate a template ahead of time with a placeholder
              > dictionary inserted into the search list (within a webware servlet).
              > Does anyone see a problem with this setup as far as thread-safety is
              > concerned. Or, is the cost of instantiating a template so minimal that
              > doing it this way is overkill?
              >
              > #-----\\\ BEGIN widget.tmpl
              > My name is '$name'... ($description)
              > #-----/// END
              >
              > #-----\\\ BEGIN Test.py
              > from WebKit.Page import Page
              > from widget import widget
              >
              > class Test(Page):
              > def __init__ (self):
              > Page.__init__ (self)
              > self.tempData = {}
              > self.origData = {'name':'Test', 'description':'a test page'}
              > self.widget = widget(searchList=[self.tempData])
              > def getDynamicData(self):
              > # do something more interesting with the field data
              > return self.request().fields()
              > def awake (self, transaction):
              > Page.awake(self, transaction)
              > self.tempData.update(self.origData)
              > self.tempData.update(self.getDynamicData())
              > def sleep (self, transaction):
              > self.tempData.clear()
              > Page.sleep(self, transaction)
              > def writeContent(self):
              > self.write(str(self.widget))
              > #-----/// END
              >
              >
              >
              > -------------------------------------------------------
              > This SF.net email is sponsored by:
              > The Definitive IT and Networking Event. Be There!
              > NetWorld+Interop Las Vegas 2003 -- Register today!
              > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
              > _______________________________________________
              > Cheetahtemplate-discuss mailing list
              > Cheetahtemplate-discuss@...
              > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



              -------------------------------------------------------
              This SF.net email is sponsored by:
              The Definitive IT and Networking Event. Be There!
              NetWorld+Interop Las Vegas 2003 -- Register today!
              http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
              _______________________________________________
              Cheetahtemplate-discuss mailing list
              Cheetahtemplate-discuss@...
              https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
            • Dirk Hoffmann
              ... Hi Tavis, I did as you proposed. No SampleBaseClass.py was created after deactivating the tearDown() method and running the test in the normal way. But I
              Message 6 of 9 , Mar 28 9:30 AM
              • 0 Attachment
                > Can you comment out the tearDown() method for that test class on line 1950 of
                > Cheetah/src/Tests/SyntaxAndOutput.py and check to see if a file called
                > SampleBaseClass.py has been created in it. Line 1943 of
                > Cheetah/src/Tests/SyntaxAndOutput.py creates that file and the test case that
                > is failing attempts to import it.

                Hi Tavis,

                I did as you proposed. No SampleBaseClass.py was created after
                deactivating the tearDown() method and running the test in the normal way.

                But I tried something different and found something strange:
                I executed the following command (one line) which I had derived from the
                contents of the /usr/bin/cheetah script:

                bash# /usr/bin/python -c "from Cheetah.CheetahWrapper import
                CheetahWrapper; CheetahWrapper().main()" test

                No error was found in this case as opposed to executing

                bash# bin/cheetah test

                or

                bash# /usr/bin/python bin/cheetah test

                from within the Cheetah-0.9.15rc2 installation directory or

                bash# cheetah test

                or

                bash# /usr/bin/cheetah test

                from anywhere.

                I think both ways should do the same but I'm pretty new to Python and so
                may have done a mistake.

                regards
                Dirk Hoffmann






                -------------------------------------------------------
                This SF.net email is sponsored by:
                The Definitive IT and Networking Event. Be There!
                NetWorld+Interop Las Vegas 2003 -- Register today!
                http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
                _______________________________________________
                Cheetahtemplate-discuss mailing list
                Cheetahtemplate-discuss@...
                https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
              • Tavis Rudd
                Hi Dirk, this is odd. As you say, that command should always have the same output regargless of how it s called. Can you check the #! shband line at the top
                Message 7 of 9 , Mar 28 11:10 AM
                • 0 Attachment
                  Hi Dirk,
                  this is odd. As you say, that command should always have the same output
                  regargless of how it's called.

                  Can you check the #! shband line at the top of your /usr/bin/cheetah file and
                  see what version of Python it is pointing to. There's a chance that an old
                  copy of that file is pointing another version of Python, though, I'm not sure
                  what effect that would have. I'm grasping in the dark at this stage, as both
                  invocations work on my box.

                  Cheers,
                  Tavis

                  On Friday 28 March 2003 09:30, Dirk Hoffmann wrote:
                  > > Can you comment out the tearDown() method for that test class on line
                  > > 1950 of Cheetah/src/Tests/SyntaxAndOutput.py and check to see if a file
                  > > called SampleBaseClass.py has been created in it. Line 1943 of
                  > > Cheetah/src/Tests/SyntaxAndOutput.py creates that file and the test case
                  > > that is failing attempts to import it.
                  >
                  > Hi Tavis,
                  >
                  > I did as you proposed. No SampleBaseClass.py was created after
                  > deactivating the tearDown() method and running the test in the normal way.
                  >
                  > But I tried something different and found something strange:
                  > I executed the following command (one line) which I had derived from the
                  > contents of the /usr/bin/cheetah script:
                  >
                  > bash# /usr/bin/python -c "from Cheetah.CheetahWrapper import
                  > CheetahWrapper; CheetahWrapper().main()" test
                  >
                  > No error was found in this case as opposed to executing
                  >
                  > bash# bin/cheetah test
                  >
                  > or
                  >
                  > bash# /usr/bin/python bin/cheetah test
                  >
                  > from within the Cheetah-0.9.15rc2 installation directory or
                  >
                  > bash# cheetah test
                  >
                  > or
                  >
                  > bash# /usr/bin/cheetah test
                  >
                  > from anywhere.
                  >
                  > I think both ways should do the same but I'm pretty new to Python and so
                  > may have done a mistake.

                  I don't think so.


                  -------------------------------------------------------
                  This SF.net email is sponsored by:
                  The Definitive IT and Networking Event. Be There!
                  NetWorld+Interop Las Vegas 2003 -- Register today!
                  http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
                  _______________________________________________
                  Cheetahtemplate-discuss mailing list
                  Cheetahtemplate-discuss@...
                  https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
                Your message has been successfully submitted and would be delivered to recipients shortly.