-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated README.md - Adjusted tests
- Loading branch information
Showing
3 changed files
with
38 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,4 @@ jobs: | |
- name: Test with pytest | ||
run: | | ||
python -m pytest test.py | ||
python -m pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sqlite3 | ||
|
||
import pytest | ||
|
||
from tekken8_scraper.jun_kazama_scraper import JunKazamaScraper | ||
from tekken8_scraper.migrate_to_sqlite import migrate_to_sqlite | ||
from tekken8_scraper.transform_data import clean_data | ||
|
||
|
||
def test_full_process(): | ||
jks = JunKazamaScraper() | ||
jun_data = jks.start_jun_scraper() | ||
jun_data_cleaned = clean_data(jun_data) | ||
sqlite_db = 'jun_kazama_test.db' | ||
migrate_to_sqlite(jun_data_cleaned, sqlite_db) | ||
|
||
with sqlite3.connect(sqlite_db) as conn: | ||
cursor = conn.cursor() | ||
cursor.execute('SELECT * FROM JunKazamaData') | ||
data = cursor.fetchall() | ||
assert len(data) > 0 | ||
|
||
|
||
if __name__ == '__main__': | ||
pytest.main([__file__]) |