Re: Exception during duplicity testing

Scott Hannahs via Duplicity-talk <[email protected]>
Newsgroups gmane.comp.sysutils.backup.duplicity.general
Message-ID <[email protected]>
I might be.   I run pytest with the explicit path to the python module, the cwd is the directory the tar.gz file was unpacked to and then the build executed.  I did not build the documentation.  If it has something to do with po, on this system that executable is called po4a to avoid collisions, to I need to tweak that.

The code pointed to is:
except Exception:
                    log.Warn(
                        _("Cleanup of temporary directory %s failed - " "this is probably a bug.")
                        % os.fsdecode(self.__dir)
                    )
                    pass

As far as I can tell this is not instantiated in the duplicity/__init__.py?  This only defines version and release date?

-Scott

> On Aug 20, 2024, at 12:03 PM, Kenneth Loafman <[email protected]> wrote:
> 
> I'm guessing at this point that you are trying to run pytest on code from duplicity that is not in duplicity the directory structure.
> 
> '_' is instantiated in both duplicity/__init__.py and testing/__init__.py.  I see no reason for this error to occur.
> 
> The normal way to run individual test is from the root dir like so, "$ pytest testing/unit/test_tempdir.py".  It will fail otherwise.
> 
> ...Ken
> 
> 
> 
> On Mon, Aug 19, 2024 at 11:14 AM Kenneth Loafman <[email protected] <mailto:[email protected]>> wrote:
>> The '_' is a function that returns the translations from the po directory.  It's made global by duplicity/__init__.py in gettest.install().
>> 
>> It should be present always.  
>> 
>> Are there more logs?
>> 
>> ...Ken
>> 
>> 
>> On Sun, Aug 18, 2024 at 1:01 PM Scott Hannahs via Duplicity-talk <[email protected] <mailto:[email protected]>> wrote:
>>> When running the duplicity tests during the build process, They all pass   The “skipped tests” seem to be not implementing all the possible backends.
>>> 
>>> But I get one exception thrown.  Duplicity 3.0.0 (not updated for the last two minor updates).
>>> 
>>> ================= 459 passed, 17 skipped in 687.30s (0:11:27) ==================
>>> Exception ignored in: <function TemporaryDirectory.__del__ at 0x1081b5b40>
>>> Traceback (most recent call last):
>>>   File "/opt/sw/src/fink.build/duplicity-3.0.0-1/duplicity-rel.3.0.0/duplicity/tempdir.py", line 180, in __del__
>>>   File "/opt/sw/src/fink.build/duplicity-3.0.0-1/duplicity-rel.3.0.0/duplicity/tempdir.py", line 284, in cleanup
>>> NameError: name '_' is not defined
>>> 
>>> Is this something that I should worry about or needs fixing?  Just a code typo?
>>> -Scott
>>> 
>>> 
>>> _______________________________________________
>>> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.