Skip to content

Commit

Permalink
fix config issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethjmyers committed Apr 26, 2024
1 parent 16f5177 commit 10ad330
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 10 additions & 3 deletions model/test_discordUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
import responses


PATH_OF_THIS_FILE = os.path.dirname(os.path.abspath(__file__))


@pytest.fixture(scope='module')
def cfg():
cfg_file = cu.find_config()
cfg = cu.parse_config(cfg_file)
return cfg
try:
cfg_file = cu.find_config()
except FileNotFoundError as e:
print(e)
cfg_file = os.path.join(PATH_OF_THIS_FILE, "../../example_reddit.cfg")
cfg = cu.parse_config(cfg_file)
return cfg


def test_makeHeader(cfg):
Expand Down
6 changes: 5 additions & 1 deletion model/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ def modelName():

@pytest.fixture(scope='module')
def cfg():
cfg_file = cu.find_config()
try:
cfg_file = cu.find_config()
except FileNotFoundError as e:
print(e)
cfg_file = os.path.join(PATH_OF_THIS_FILE, "../../example_reddit.cfg")
cfg = cu.parse_config(cfg_file)
return cfg

Expand Down

0 comments on commit 10ad330

Please sign in to comment.