From 89d7808c9ce74c5ac4980098cd19ac644ce5a803 Mon Sep 17 00:00:00 2001 From: Muhammad Hamza Sajjad Date: Tue, 16 Apr 2024 21:36:33 +0100 Subject: [PATCH] remove is_valid_lib_name helper --- python/tests/integration/arcticdb/test_lmdb.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python/tests/integration/arcticdb/test_lmdb.py b/python/tests/integration/arcticdb/test_lmdb.py index a4a09a036a..aebf42ad97 100644 --- a/python/tests/integration/arcticdb/test_lmdb.py +++ b/python/tests/integration/arcticdb/test_lmdb.py @@ -111,21 +111,21 @@ def test_invalid_lmdb_lib_name_windows(lmdb_storage, invalid_lib_name): assert ac.list_libraries() == [] -def is_valid_lmdb_lib_name(lmdb_storage, lib_name): - ac = lmdb_storage.create_arctic() - ac.create_library(lib_name) - - return ac.list_libraries() == [lib_name] - # Valid names on all platforms @pytest.mark.parametrize("valid_lib_name", ["lib#~@,1", "lib{)[.1", "!lib$%^"]) def test_valid_lib_name(lmdb_storage, valid_lib_name): - assert is_valid_lmdb_lib_name(lmdb_storage, valid_lib_name) + ac = lmdb_storage.create_arctic() + ac.create_library(valid_lib_name) + + assert ac.list_libraries() == [valid_lib_name] @pytest.mark.skipif(sys.platform == "win32", reason="Windows has different file path name restrictions") @pytest.mark.parametrize("valid_lib_name", ["lib?1", "lib:1", "lib|1", "lib "]) def test_valid_lib_name_linux(lmdb_storage, valid_lib_name): - assert is_valid_lmdb_lib_name(lmdb_storage, valid_lib_name) + ac = lmdb_storage.create_arctic() + ac.create_library(valid_lib_name) + + assert ac.list_libraries() == [valid_lib_name] def test_lmdb_mapsize(tmp_path): # Given - tiny map size