Skip to content

Commit

Permalink
Updating test for new load function
Browse files Browse the repository at this point in the history
  • Loading branch information
John Hawkins authored and John Hawkins committed Apr 23, 2021
1 parent f2c6a48 commit c30d4c3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from projit.utils import get_properties
from projit.utils import write_properties

from projit.projit import projit_load

def test_walk():
gena = walk_up("./tests")
path, dirs, files = gena.__next__()
Expand Down Expand Up @@ -54,7 +56,7 @@ def test_projit_init_v2():
assert project.desc == "TEST"
shutil.rmtree(config_folder)

def test_projit_load():
def test_projit_json_load():
"""
In this test we see that we can load a JSON file into a Projit object
"""
Expand All @@ -63,6 +65,21 @@ def test_projit_load():
assert project.desc == "TEST"


def test_projit_load():
testdir = "temp_test_dir_xyz"
os.mkdir(testdir)
os.chdir(testdir)
project = proj.init("default", "myproject", "myproject")
os.mkdir("someotherdir")
os.chdir("someotherdir")
theproject = projit_load()
print("ORIGINAL:", project.path)
print("LOADED:", theproject.path)
assert project.name == theproject.name
os.chdir("../")
os.chdir("../")
shutil.rmtree(testdir)

def test_template_results():
testdir = "temp_test_dir_xyz"
os.mkdir(testdir)
Expand Down

0 comments on commit c30d4c3

Please sign in to comment.