olofbengtsson commited on
Commit
f8ad876
1 Parent(s): 4795530

Added test folder with some tests for the scraper and a file to start writing in for the classifier

Browse files
tests/classifier_test.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import unittest
2
+ import pandas as pd
3
+ from datetime import datetime
4
+ import sys
5
+ from pathlib import Path
6
+ sys.path.insert(0, str(Path(__file__).parents[1]) + "/textclassifier")
7
+ from TextClassifier import TextClassifier
8
+
9
+ class MyTestCase(unittest.TestCase):
10
+ def test_something(self):
11
+ self.assertEqual(True, False) # add assertion here
12
+
13
+
14
+ if __name__ == '__main__':
15
+ unittest.main()
{twitterscraper → tests}/scraper_test.py RENAMED
@@ -2,9 +2,11 @@ import unittest
2
 
3
  import pandas as pd
4
  from datetime import datetime
5
- import regex as re
 
 
6
 
7
- from TwitterScraper import TwitterScraper
8
 
9
  class MyTestCase(unittest.TestCase):
10
 
 
2
 
3
  import pandas as pd
4
  from datetime import datetime
5
+ import sys
6
+ from pathlib import Path
7
+ sys.path.insert(0, str(Path(__file__).parents[1]) + "/twitterscraper")
8
 
9
+ from TwitterScraper import TwitterScraper # Detta är inget problem, den hittar filen
10
 
11
  class MyTestCase(unittest.TestCase):
12