-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from elekto-io/subprocess
Replace all os.system() calls with suprocess.run()
- Loading branch information
Showing
3 changed files
with
7 additions
and
7 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.6.12-stretch | ||
FROM python:3.7-stretch | ||
|
||
WORKDIR /app | ||
|
||
|
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 |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
# Author(s): Manish Sahani <[email protected]> | ||
|
||
import os | ||
import subprocess | ||
import sys | ||
import pytest | ||
import pandas as pd | ||
|
@@ -37,14 +38,14 @@ | |
def client(): | ||
# Generate Database | ||
db = os.path.abspath('./test.db') | ||
os.system('touch {}'.format(db)) | ||
subprocess.run(['touch', db], check=True) | ||
|
||
with APP.test_client() as client: | ||
with APP.app_context(): | ||
migrate(APP.config['DATABASE_URL']) | ||
yield client | ||
|
||
os.system('rm {}'.format(db)) | ||
os.unlink(db) | ||
# os.system('rm -rf {}'.format(APP.config['META']['PATH'])) | ||
|
||
|
||
|