-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_testing.ps1
29 lines (24 loc) · 929 Bytes
/
setup_testing.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Define the test file path
$TEST_FILE = "C:\Users\marco\my_project\scripts\test_preprocessing.py"
# Create test directory if not exists
if (-Not (Test-Path -Path "C:\Users\marco\my_project\scripts")) {
New-Item -Path "C:\Users\marco\my_project\scripts" -ItemType Directory
}
# Update the test script
@"
import unittest
import pandas as pd
from your_module import preprocess_whatsapp_chats
class TestPreprocessing(unittest.TestCase):
def test_preprocess(self):
df = preprocess_whatsapp_chats('../data')
self.assertFalse(df.empty)
self.assertTrue('Date' in df.columns)
self.assertTrue('Time' in df.columns)
self.assertTrue('Author' in df.columns)
self.assertTrue('Message' in df.columns)
if __name__ == '__main__':
unittest.main()
"@ | Out-File -FilePath $TEST_FILE -Encoding utf8
# Print confirmation
Write-Output "Automated testing setup completed successfully."