Rename test3 test directory to test_add
This commit is contained in:
parent
6ff569f032
commit
4d27a34fa2
8
test.py
8
test.py
@ -58,13 +58,13 @@ class TestShowAll(unittest.TestCase):
|
|||||||
class TestAdd(unittest.TestCase):
|
class TestAdd(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
import shutil
|
import shutil
|
||||||
shutil.rmtree(os.path.join(TEST_DATA_DIR, "test3"))
|
shutil.rmtree(os.path.join(TEST_DATA_DIR, "test_add"))
|
||||||
os.mkdir(os.path.join(TEST_DATA_DIR, "test3"))
|
os.mkdir(os.path.join(TEST_DATA_DIR, "test_add"))
|
||||||
|
|
||||||
def test_add_sub(self):
|
def test_add_sub(self):
|
||||||
with open(os.path.join(TEST_DATA_DIR, "test3/todo.txt"), "w") as f:
|
with open(os.path.join(TEST_DATA_DIR, "test_add/todo.txt"), "w") as f:
|
||||||
f.write("(Z) gibberish")
|
f.write("(Z) gibberish")
|
||||||
setup_environment("test3")
|
setup_environment("test_add")
|
||||||
sub.addSub(1, "sub", False)
|
sub.addSub(1, "sub", False)
|
||||||
out = sub.getSub(sub.getItem(1))
|
out = sub.getSub(sub.getItem(1))
|
||||||
self.assertTrue(out is not None)
|
self.assertTrue(out is not None)
|
||||||
|
Loading…
Reference in New Issue
Block a user