From a47f3a724d16074d756f5b2304d5cdb4d206af01 Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 30 Nov 2023 00:10:35 -0800 Subject: [PATCH] [TESTS][Fixed test names to contain test_ for pytest][FEAT][scripts folder] --- code_quality.sh => scripts/code_quality.sh | 0 scripts/test_name.sh | 8 ++++++++ scripts/tests.sh | 1 + tests/memory/{qdrant.py => test_qdrant.py} | 0 4 files changed, 9 insertions(+) rename code_quality.sh => scripts/code_quality.sh (100%) create mode 100755 scripts/test_name.sh create mode 100644 scripts/tests.sh rename tests/memory/{qdrant.py => test_qdrant.py} (100%) diff --git a/code_quality.sh b/scripts/code_quality.sh similarity index 100% rename from code_quality.sh rename to scripts/code_quality.sh diff --git a/scripts/test_name.sh b/scripts/test_name.sh new file mode 100755 index 00000000..cdc6a013 --- /dev/null +++ b/scripts/test_name.sh @@ -0,0 +1,8 @@ +find ./tests -name "*.py" -type f | while read file +do + filename=$(basename "$file") + dir=$(dirname "$file") + if [[ $filename != test_* ]]; then + mv "$file" "$dir/test_$filename" + fi +done \ No newline at end of file diff --git a/scripts/tests.sh b/scripts/tests.sh new file mode 100644 index 00000000..13f4111a --- /dev/null +++ b/scripts/tests.sh @@ -0,0 +1 @@ +find ./tests -name '*.py' -exec pytest {} \; \ No newline at end of file diff --git a/tests/memory/qdrant.py b/tests/memory/test_qdrant.py similarity index 100% rename from tests/memory/qdrant.py rename to tests/memory/test_qdrant.py