Ken
On Aug 21, 2024, at 11:02 AM, Kenneth Loafman <kenneth@loafman.com> wrote:
Some answers to your questions: - The '_' is installed via gettext.install() in the two init files above.
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. - No need to build documentation. It's on the web.
That is my strategy at the moment. I have skipped rebuilding it and am happy with it. - pytest needs no additional arguments. They come from pyproject.toml.
I assumed that and is why ALL of the tests were listed as passed or skipped. - The skipped files are because you don't have things like lftp, rclone, etc.. See README.md.
I agree. I recognize that I am missing some backends. - When running the tests in a proper environment they show why they are skipped. This is not a problem.
I agree. All tests are passed or skipped. I assume they are skipped due to missing backends. But they don’t show that reason. There is just an “s” in the test list for each skipped test. - As to .po files, you need intltool, which provides msgfmt. msgfmt is used in setup.py to build the translation directories.
I have intltool installed and working. But not necessary if I don’t build the documentation which I am not. 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: _("Cleanup of temporary directory %s failed - " "this is probably a bug.") % os.fsdecode(self.__dir)
As far as I can tell this is not instantiated in the duplicity/__init__.py? This only defines version and release date?
-Scott
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 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
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
|