Re: Exception during duplicity testing
Scott Hannahs via Duplicity-talk <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.duplicity.general |
|---|---|
| Message-ID | <[email protected]> |
Ken, Of course, but the point was that the testing module does not seem to set it and thus fails when it does an assert on “curtimestr”. This of course fails. Should the test call dup_time.setcurtime() before the assert? On all platforms? That would be the call that I was guessing was missing. The test module for "testing/unit/test_collections.py::CollectionTest::test_collections_status” should set the current time in the test routine? -Scott > On Sep 6, 2024, at 14:14, Kenneth Loafman via Duplicity-talk <[email protected]> wrote: > > This is the way it works, like it should, in all versions. > > dup_time.curtimestr is not set until dup_time.setcurtime() is called. Just importing the module will not set it. > > ...Ken > > On Fri, Sep 6, 2024 at 12:42 PM Scott Hannahs via Duplicity-talk <[email protected] <mailto:[email protected]>> wrote: >> Just to finish up on this (duplicity 3.0.0) >> The test that fails seems to be: >> >> If I run pythion3.10 manually and use the following commands, this is the result: >> >> % python3.10 >> Python 3.10.4 (main, Jul 1 2023, 16:39:08) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> from duplicity import dup_time >> >>> assert dup_time.curtimestr >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> AssertionError >> >>> print(dup_time.curtimestr) >> None >> >> Am I reading this wrong or is something missing in the duplicity time function? Does it need an initialization call to initialize the global curtimestr? >> >> NB: (I seem to get that same error under duplicity version 3.0.2) >> >> -Scott >> >> >>> On Aug 22, 2024, at 7:48 PM, Scott Hannahs <[email protected] <mailto:[email protected]>> wrote: >>> >>> Thomas, >>> >>> Perfect. I will try that. Not looking to be a python expert by any means. Not my favorite language. But thanks for the pointer. >>> >>> If I need more I will RTFM. >>> >>> -Scott >>> >>> >>>> On Aug 22, 2024, at 5:11 PM, Thomas Laubrock <[email protected] <mailto:[email protected]>> wrote: >>>> >>>> Hi Scott, >>>> >>>> this is pretty easy. Simply add the folder or path to a test e.g.: >>>> >>>> `pytest testing/functional/` >>>> >>>> `pytest testing/unit/test_collections.py` >>>> >>>> You can even address a specific test: >>>> >>>> `pytest testing/unit/test_collections.py::CollectionTest::test_collections_status` >>>> >>>> Bye >>>> >>>> Thomas >>>> >>>> There are good pytest docs out there if you looking for more. >>>> >>>> >>>> >>>> On 22.08.24 02:36, Scott Hannahs wrote: >>>>> Thomas, >>>>> >>>>> I don’t know how to connect it to a specific test. I take it this is not something others see when running the complete test suite. I’ll just put it down to weirdness. It may be something in how the backends shutdown during a test? Maybe it is the exact version of the backends that I have? Since the test does not list as a failure I am going to just move on. >>>>> >>>>> -Scott >>>>> >>>>>> On Aug 21, 2024, at 6:01 PM, Thomas Laubrock via Duplicity-talk <[email protected]> <mailto:[email protected]> wrote: >>>>>> >>>>>> Hi Scott, >>>>>> >>>>>> On 21.08.24 18:02, Scott Hannahs via Duplicity-talk wrote: >>>>>>> Ok, I will look for that. But I still don’t know where the “ignored exception” comes from. At the moment I am ignoring that ignored exception and will continue to do so. Just thought it may indicate some other hidden issue. If it was a big problem I expect that it would have an “f” in the test list and show as a failed test. I think it is just text that went from python to the std err output. >>>>>> “ignored exception” comes from the python interpreter if the exception is raised late in the shutdown process that it can't be handled any more. >>>>>> >>>>>> Are you able to trace this down to a specific test? >>>>>> >>>>>> At the end this doesn't necessarily mean that this is an issue in duplicity or the test itself, because it could be triggered intentionally while creating an intentional error case. >>>>>> >>>>>> Bye >>>>>> >>>>>> Thomas >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Duplicity-talk mailing list >>>>>> [email protected] <mailto:[email protected]> >>>>>> https://lists.nongnu.org/mailman/listinfo/duplicity-talk >>> >> >> _______________________________________________ >> Duplicity-talk mailing list >> [email protected] <mailto:[email protected]> >> https://lists.nongnu.org/mailman/listinfo/duplicity-talk > _______________________________________________ > Duplicity-talk mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/duplicity-talk _______________________________________________ Duplicity-talk mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/duplicity-talk