duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Exception during duplicity testing


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] Exception during duplicity testing
Date: Wed, 21 Aug 2024 10:02:53 -0500

Some answers to your questions:
  1. The '_'  is installed via gettext.install() in the two init files above.
  2. No need to build documentation.  It's on the web.
  3. pytest needs no additional arguments.  They come from pyproject.toml.
  4. The skipped files are because you don't have things like lftp, rclone, etc.. See README.md.
  5. When running the tests in a proper environment they show why they are skipped.  This is not a problem.
  6. As to .po files, you need intltool, which provides msgfmt.  msgfmt is used in setup.py to build the translation directories.
...Ken


On Tue, Aug 20, 2024 at 9:25 PM Scott Hannahs <sth@p-hall.net> wrote:
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 <kenneth@loafman.com> 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 <kenneth@loafman.com> 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 <duplicity-talk@nongnu.org> 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
Duplicity-talk@nongnu.org
https://lists.nongnu.org/mailman/listinfo/duplicity-talk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]