Skip to content

Commit 34bb22e

Browse files
committed
Project work 6 updated
1 parent bd45d8a commit 34bb22e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

project/tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fi
3232

3333
# Validate database tables in los_angeles_data_portal.sqlite
3434
echo "Checking database tables in $OUTPUT_FILE1..."
35-
TABLES1=$("$PYTHON_BIN" -c "import sqlite3; conn = sqlite3.connect('$OUTPUT_FILE1'); print([row[0] for row in conn.execute('SELECT name FROM sqlite_master WHERE type=\'table\';')])")
35+
TABLES1=$(sqlite3 "$OUTPUT_FILE1" ".tables")
3636
EXPECTED_TABLE1="los_angeles_data_portal"
3737
echo "$TABLES1" | grep -qi "$EXPECTED_TABLE1"
3838
if [ $? -eq 0 ]; then
@@ -44,7 +44,7 @@ fi
4444

4545
# Validate database tables in meteostat.sqlite
4646
echo "Checking database tables in $OUTPUT_FILE2..."
47-
TABLES2=$("$PYTHON_BIN" -c "import sqlite3; conn = sqlite3.connect('$OUTPUT_FILE2'); print([row[0] for row in conn.execute('SELECT name FROM sqlite_master WHERE type=\'table\';')])")
47+
TABLES2=$(sqlite3 "$OUTPUT_FILE2" ".tables")
4848
EXPECTED_TABLE2="meteostat"
4949
echo "$TABLES2" | grep -qi "$EXPECTED_TABLE2"
5050
if [ $? -eq 0 ]; then
@@ -54,4 +54,4 @@ else
5454
exit 1
5555
fi
5656

57-
echo "All tests passed successfully."
57+
echo "All tests passed successfully."

0 commit comments

Comments
 (0)