Skip to content

Commit

Permalink
Correct test
Browse files Browse the repository at this point in the history
  • Loading branch information
Net-Mist committed Aug 27, 2019
1 parent ba78b86 commit 62c3212
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions distribute_config/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def test_int(self):
return_value=argparse.Namespace(v1=2, v2=3, c="conf.yml"))
def test_load_conf(self, mock_args):
Config.clear()
os.remove("conf.yml")
if os.path.exists("conf.yml"):
os.remove("conf.yml")
Config.define_int("v1", 1, "var")
Config.define_int("v2", 2, "var")
Config.load_conf()
Expand Down Expand Up @@ -136,7 +137,8 @@ def test_load_conf_4(self, mock_args):
return_value=argparse.Namespace(**{"n1.v1": 2, "n1.v2": 3}, c="conf.yml"))
def test_load_conf_5(self, mock_args):
Config.clear()
os.remove("conf.yml")
if os.path.exists("conf.yml"):
os.remove("conf.yml")
with Config.namespace("n1"):
Config.define_int("v1", 1, "var")
Config.define_int("v2", 2, "var")
Expand Down

0 comments on commit 62c3212

Please sign in to comment.