From 2f4a229b7af6cbb4955ad57ed4769eab3f17bedc Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sun, 25 Feb 2024 20:16:51 +0100 Subject: Remove compatibility helper for python < 3.8 --- tests/test_collection.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'tests/test_collection.py') diff --git a/tests/test_collection.py b/tests/test_collection.py index 63f89d2..dcc2196 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -11,13 +11,11 @@ import ruamel.yaml import lesana -from . import utils - class testEntries(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.TemporaryDirectory() - utils.copytree( + shutil.copytree( 'tests/data/simple', self.tmpdir.name, dirs_exist_ok=True @@ -141,7 +139,7 @@ class testEntries(unittest.TestCase): class testEmptyCollection(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.TemporaryDirectory() - utils.copytree( + shutil.copytree( 'tests/data/empty', self.tmpdir.name, dirs_exist_ok=True @@ -162,7 +160,7 @@ class testEmptyCollection(unittest.TestCase): class testSimpleCollection(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.TemporaryDirectory() - utils.copytree( + shutil.copytree( 'tests/data/simple', self.tmpdir.name, dirs_exist_ok=True @@ -385,7 +383,7 @@ class testSimpleCollection(unittest.TestCase): class testComplexCollection(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.TemporaryDirectory() - utils.copytree( + shutil.copytree( 'tests/data/complex', self.tmpdir.name, dirs_exist_ok=True @@ -586,7 +584,7 @@ class testComplexCollection(unittest.TestCase): class testCollectionWithErrors(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.TemporaryDirectory() - utils.copytree( + shutil.copytree( 'tests/data/wrong', self.tmpdir.name, dirs_exist_ok=True @@ -749,7 +747,7 @@ class testCollectionCreation(unittest.TestCase): def test_deletion(self): shutil.copy('tests/data/simple/settings.yaml', self.tmpdir.name) - utils.copytree( + shutil.copytree( 'tests/data/simple/items', os.path.join(self.tmpdir.name, 'items'), ) collection = lesana.Collection.init(self.tmpdir.name) @@ -775,7 +773,7 @@ class testCollectionCreation(unittest.TestCase): def test_partial_eid_deletion(self): shutil.copy('tests/data/simple/settings.yaml', self.tmpdir.name) - utils.copytree( + shutil.copytree( 'tests/data/simple/items', os.path.join(self.tmpdir.name, 'items'), ) collection = lesana.Collection.init(self.tmpdir.name) @@ -809,7 +807,7 @@ class testCollectionCreation(unittest.TestCase): def test_git_adding(self): shutil.copy('tests/data/simple/settings.yaml', self.tmpdir.name) - utils.copytree( + shutil.copytree( 'tests/data/simple/items', os.path.join(self.tmpdir.name, 'items'), ) collection = lesana.Collection.init(self.tmpdir.name) -- cgit v1.2.3