commit:     c472d08dd0c41e55fbea74805768a82b095db07b
Author:     David Palao <david.palao <AT> gmail <DOT> com>
AuthorDate: Fri May  5 13:25:50 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 26 15:44:36 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c472d08d

tests: file_copy: port testCopyFileSparse to pytest

Signed-off-by: David Palao <david.palao <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/tests/util/file_copy/test_copyfile.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/portage/tests/util/file_copy/test_copyfile.py 
b/lib/portage/tests/util/file_copy/test_copyfile.py
index 55bdeec66..6e5ae9571 100644
--- a/lib/portage/tests/util/file_copy/test_copyfile.py
+++ b/lib/portage/tests/util/file_copy/test_copyfile.py
@@ -1,9 +1,11 @@
-# Copyright 2017 Gentoo Foundation
+# Copyright 2017, 2023 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import shutil
 import tempfile
 
+import pytest
+
 from portage import os
 from portage.tests import TestCase
 from portage.checksum import perform_md5
@@ -56,10 +58,12 @@ class CopyFileSparseTestCase(TestCase):
             # This last part of the test is expected to fail when sparse
             # copy is not implemented, so set the todo flag in order
             # to tolerate failures.
-            self.todo = True
+            ## self.todo = True
 
             # If sparse blocks were preserved, then both files should
             # consume the same number of blocks.
+
+            pytest.xfail(reason="sparse copy is not implemented")
             self.assertEqual(os.stat(src_path).st_blocks, 
os.stat(dest_path).st_blocks)
         finally:
             shutil.rmtree(tempdir)

Reply via email to