Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jvivian committed Oct 21, 2023
1 parent eb7e2ed commit 0b961e3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion coverage.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<coverage version="7.3.1" timestamp="1697579914664" lines-valid="115" lines-covered="115" line-rate="1" branches-valid="42" branches-covered="42" branch-rate="1" complexity="0">
<coverage version="7.3.1" timestamp="1697606544233" lines-valid="115" lines-covered="115" line-rate="1" branches-valid="42" branches-covered="42" branch-rate="1" complexity="0">
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.3.1 -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
Expand Down
11 changes: 6 additions & 5 deletions tests/test_dfm.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import os
import shutil
from pathlib import Path

from covid19_drdfm.dfm import run_model
from covid19_drdfm.processing import get_df


# TODO: output should go in a directory instead of dumping shit everywhere
def test_run_model():
df = get_df()
run_model(df, "NY", Path("./"))
assert Path("./model.csv").exists()
assert Path("./results.csv").exists()
os.remove("./model.csv")
os.remove("./results.csv")
run_model(df, "NY", Path("./testdir"))
assert Path("./testdir/model.csv").exists()
assert Path("./testdir/results.csv").exists()
shutil.rmtree("./testdir")
8 changes: 4 additions & 4 deletions tests/test_processing.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import pandas as pd
import pytest
from functools import reduce

import pandas as pd
import pytest

from covid19_drdfm.processing import (
DATA_DIR,
ROOT_DIR,
add_datetime,
adjust_inflation,
adjust_pandemic_response,
get_df,
get_govt_fund_dist,
DATA_DIR,
ROOT_DIR,
)


Expand Down

0 comments on commit 0b961e3

Please sign in to comment.