示例#1
0
import sys
import common_func

from common_func import plan_file_add, plant_issue, plant_check, remove_created_plans

# Check the assign task command
# Test:
# plan add <plan_name>
# task add <task_name>
# task assign 1 resour
# plan show
# <check output>

plan_app = sys.argv[1] + "/../build/plant"
plan_name = str(uuid.uuid4())
plan_file_add(plan_name)
task_name = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() + common_func.create_task_str(
    1, 1, task_name, "P", 0, "   0:00:00", 0, " resour"))

# Run all the process and check output
plant_issue([plan_app, "plan", "add", plan_name])
plant_issue([plan_app, "task", "add", task_name])
plant_issue([plan_app, "task", "assign", "1", "resour"])
plant_check([plan_app, "plan", "show"], check_string)

# Remove plan files
remove_created_plans()

sys.exit(0)
示例#2
0
# plan add <plan_name>
# task add <task_name>
# task progress 1 50
# task progress 1 100
# task progress 1 30
# task progress 1 0
# plan show
# <check output>

plan_app = sys.argv[1] + "/../build/plant"
plan_name = str(uuid.uuid4())
plan_file_add(plan_name)
task_name = str(uuid.uuid4())[:23]
check_string1 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 50, "   0:00:00", 0, ""))
check_string2 = (common_func.table_header() + common_func.create_task_str(
    1, 1, task_name, "C", 100, "   0:00:00", 0, ""))
check_string3 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 30, "   0:00:00", 0, ""))
check_string4 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 0, "   0:00:00", 0, ""))

# Run all the process and check output
plant_issue([plan_app, "plan", "add", plan_name])
plant_issue([plan_app, "task", "add", task_name])
plant_issue([plan_app, "task", "progress", "1", "50"])
plant_check([plan_app, "plan", "show"], check_string1)
plant_issue([plan_app, "task", "progress", "1", "100"])
示例#3
0
# Test:
# plan add <plan_name>
# task add <task_name>
# task start 1
# sleep 5
# task stop 1
# plan show
# <check output>

plan_app = sys.argv[1] + "/../build/plant"
plan_name = str(uuid.uuid4())
plan_file_add(plan_name)
task_name = str(uuid.uuid4())[:23]
check_string = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 0, "   0:00:05", 0, "") +
    "DONT CHECK\n" + "DONT CHECK\n")

# Run all the process and check output
plant_issue([plan_app, "plan", "add", plan_name])
plant_issue([plan_app, "task", "add", task_name])
plant_issue([plan_app, "task", "start", "1"])
time.sleep(5)
plant_issue([plan_app, "task", "stop", "1"])
plant_check([plan_app, "plan", "show"], check_string)

# Remove plan files
remove_created_plans()

sys.exit(0)
示例#4
0
# task add <task_name>
# task track 1 10
# task track 1 5
# task track 1 -15
# task track 1 2
# task track 1 -20
# plan show
# <check output>

plan_app = sys.argv[1] + "/../build/plant"
plan_name = str(uuid.uuid4())
plan_file_add(plan_name)
task_name = str(uuid.uuid4())[:23]
check_string1 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 0, "  10:00:00", 0, "") +
    "     |        extra hours (not tracked):   10h  |   |      |            |        |\n"
)
check_string2 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 0, "  15:00:00", 0, "") +
    "     |        extra hours (not tracked):   15h  |   |      |            |        |\n"
)
check_string3 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 0, "   0:00:00", 0, ""))
check_string4 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "P", 0, "   2:00:00", 0, "") +
    "     |        extra hours (not tracked):    2h  |   |      |            |        |\n"
)
示例#5
0
project_name24 = str(uuid.uuid4())[:23]
project_name3 = str(uuid.uuid4())[:23]
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() + common_func.create_task_str(
    3, 2, task_name21, "A", 0, "   0:00:00", 0, "") +
                common_func.create_task_str(13, 3, task_name333, "A", 0,
                                            "   0:00:00", 0, "") +
                "DONT CHECK\n" + "DONT CHECK\n" + common_func.create_task_str(
                    16, 1, task_name4, "A", 0, "   0:00:00", 0, "") +
                "DONT CHECK\n" + "DONT CHECK\n" + common_func.create_task_str(
                    20, 2, task_name61, "A", 0, "   0:00:00", 0, ""))

# Run all the process and check output
plant_issue([plan_app, "plan", "add", plan_name])
plant_issue([plan_app, "task", "add", task_name1])
plant_issue([plan_app, "project", "add", project_name2])
plant_issue([plan_app, "project", "add", project_name3])
plant_issue([plan_app, "task", "add", task_name4])
plant_issue([plan_app, "project", "add", project_name5])
plant_issue([plan_app, "project", "add", project_name31, "3"])
示例#6
0
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() +
                common_func.create_project_str(1, 1, project_name2, 3, 4) +
                common_func.create_task_str(2, 2, task_name21, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(3, 2, project_name22, 0, 0) +
                common_func.create_project_str(4, 2, project_name23, 0, 0) +
                common_func.create_project_str(5, 2, project_name24, 0, 0) +
                common_func.create_project_str(6, 1, project_name3, 2, 5) +
                common_func.create_project_str(7, 2, project_name31, 0, 0) +
                common_func.create_task_str(8, 2, task_name32, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(9, 2, project_name33, 2, 3) +
                common_func.create_project_str(10, 3, project_name331, 0, 0) +
                common_func.create_project_str(11, 3, project_name332, 0, 0) +
                common_func.create_task_str(12, 3, task_name333, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(13, 2, project_name34, 0, 0) +
                common_func.create_task_str(14, 2, task_name35, "P", 0,
                                            "   0:00:00", 0, "") +
示例#7
0
project_name24 = str(uuid.uuid4())[:23]
project_name3 = str(uuid.uuid4())[:23]
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() + common_func.create_task_str(
    1, 1, task_name1, "P", 0, "   0:00:00", 0, "") +
                common_func.create_project_str(2, 1, project_name2, 3, 3) +
                common_func.create_project_str(3, 2, project_name22, 0, 0) +
                common_func.create_project_str(4, 2, project_name23, 0, 0) +
                common_func.create_project_str(5, 2, project_name24, 0, 0) +
                common_func.create_project_str(6, 1, project_name3, 2, 4) +
                common_func.create_project_str(7, 2, project_name31, 0, 0) +
                common_func.create_task_str(8, 2, task_name32, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(9, 2, project_name34, 0, 0) +
                common_func.create_task_str(10, 2, task_name35, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_task_str(11, 1, task_name4, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(12, 1, project_name5, 1, 1) +
                common_func.create_project_str(13, 2, project_name51, 0, 0) +
示例#8
0
project_name24 = str(uuid.uuid4())[:23]
project_name3 = str(uuid.uuid4())[:23]
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() + common_func.create_task_str(
    15, 1, task_name35, "P", 0, "   0:00:00", 0, ""))

# Run all the process and check output
plant_issue([plan_app, "plan", "add", plan_name])
plant_issue([plan_app, "task", "add", task_name1])
plant_issue([plan_app, "project", "add", project_name2])
plant_issue([plan_app, "project", "add", project_name3])
plant_issue([plan_app, "task", "add", task_name4])
plant_issue([plan_app, "project", "add", project_name5])
plant_issue([plan_app, "project", "add", project_name31, "3"])
plant_issue([plan_app, "task", "add", task_name32, "3"])
plant_issue([plan_app, "project", "add", project_name33, "3"])
plant_issue([plan_app, "project", "add", project_name6])
plant_issue([plan_app, "project", "add", project_name34, "3"])
plant_issue([plan_app, "task", "add", task_name35, "3"])
plant_issue([plan_app, "task", "add", task_name21, "2"])
示例#9
0
import common_func

from common_func import plan_file_add, plant_issue, plant_check, remove_created_plans

# Check the active task command
# Test:
# plan add <plan_name>
# task add <task_name>
# task active 1
# plan show
# <check output>

plan_app = sys.argv[1] + "/../build/plant"
plan_name = str(uuid.uuid4())
plan_file_add(plan_name)
task_name = str(uuid.uuid4())[:23]
check_string = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name, "A", 0, "   0:00:00", 0, ""))

# Run all the process and check output
plant_issue([plan_app, "plan", "add", plan_name])
plant_issue([plan_app, "task", "add", task_name])
plant_issue([plan_app, "task", "active", "1"])
plant_check([plan_app, "plan", "show"], check_string)

# Remove plan files
remove_created_plans()

sys.exit(0)
示例#10
0
project_name24 = str(uuid.uuid4())[:23]
project_name3 = str(uuid.uuid4())[:23]
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() + common_func.create_task_str(
    1, 1, task_name1, "P", 0, "   0:00:00", 0, "") +
                common_func.create_project_str(2, 1, project_name2, 3, 4) +
                common_func.create_task_str(3, 2, task_name21, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(4, 2, project_name22, 0, 0) +
                common_func.create_project_str(5, 2, project_name23, 0, 0) +
                common_func.create_project_str(6, 2, project_name24, 0, 0) +
                common_func.create_project_str(7, 1, project_name3, 2, 5) +
                common_func.create_project_str(8, 2, project_name31, 0, 0) +
                common_func.create_task_str(9, 2, task_name32, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(10, 2, project_name33, 2, 3) +
                common_func.create_project_str(11, 3, project_name331, 0, 0) +
                common_func.create_project_str(12, 3, project_name332, 0, 0) +
                common_func.create_task_str(13, 3, task_name333, "P", 0,
                                            "   0:00:00", 0, "") +
示例#11
0
# Check the rename task command
# Test:
# plan add <plan_name>
# task add <task_name1>
# task rename 1 <task_name2>
# plan show
# <check output>

plan_app = sys.argv[1] + "/../build/plant"
plan_name = str(uuid.uuid4())
plan_file_add(plan_name)
task_name1 = str(uuid.uuid4())[:23]
task_name2 = str(uuid.uuid4())[:23]
check_string1 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name1, "P", 0, "   0:00:00", 0, ""))
check_string2 = (
    common_func.table_header() +
    common_func.create_task_str(1, 1, task_name2, "P", 0, "   0:00:00", 0, ""))

# Run all the process and check output
plant_issue([plan_app, "plan", "add", plan_name])
plant_issue([plan_app, "task", "add", task_name1])
plant_check([plan_app, "plan", "show"], check_string1)
plant_issue([plan_app, "task", "rename", "1", task_name2])
plant_check([plan_app, "plan", "show"], check_string2)

# Remove plan files
remove_created_plans()

sys.exit(0)
示例#12
0
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (
        common_func.table_header() +
        common_func.create_task_str(1, 1, task_name1, "P", 0, "   0:00:00", 0, "") +
        common_func.create_project_str(2, 1, project_name2, 3, 4) +
        common_func.create_task_str(3, 2, task_name21, "P", 0, "   0:00:00", 0, "") +
        common_func.create_project_str(4, 2, project_name22, 0, 0) +
        common_func.create_project_str(5, 2, project_name23, 0, 0) +
        common_func.create_project_str(6, 2, project_name24, 0, 0) +
        common_func.create_project_str(7, 1, project_name3, 2, 5) +
        common_func.create_project_str(8, 2, project_name31, 0, 0) +
        common_func.create_task_str(9, 2, task_name32, "P", 0, "   0:00:00", 0, "") +
        common_func.create_project_str(10, 2, project_name33, 2, 3) +
        common_func.create_project_str(11, 3, project_name331, 0, 0) +
        common_func.create_project_str(12, 3, project_name332, 0, 0) +
        common_func.create_task_str(13, 3, task_name333, "P", 0, "   0:00:00", 0, "") +
        common_func.create_project_str(14, 2, project_name34, 0, 0) +
        common_func.create_task_str(15, 2, task_name35, "P", 0, "   0:00:00", 0, "") +
        common_func.create_task_str(16, 1, task_name4, "P", 0, "   0:00:00", 0, "") +
示例#13
0
project_name24 = str(uuid.uuid4())[:23]
project_name3 = str(uuid.uuid4())[:23]
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() + common_func.create_task_str(
    1, 1, task_name1, "P", 0, "   0:00:00", 0, "") +
                common_func.create_project_str(2, 1, project_name2, 3, 4) +
                common_func.create_task_str(3, 2, task_name21, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(4, 2, project_name22, 0, 0) +
                common_func.create_project_str(5, 2, project_name23, 0, 0) +
                common_func.create_project_str(6, 2, project_name24, 0, 0) +
                common_func.create_task_str(7, 1, task_name4, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(8, 1, project_name5, 1, 1) +
                common_func.create_project_str(9, 2, project_name51, 0, 0) +
                common_func.create_project_str(10, 1, project_name6, 0, 1) +
                common_func.create_task_str(11, 2, task_name61, "P", 0,
                                            "   0:00:00", 0, ""))

# Run all the process and check output
示例#14
0
project_name24 = str(uuid.uuid4())[:23]
project_name3 = str(uuid.uuid4())[:23]
project_name31 = str(uuid.uuid4())[:23]
task_name32 = str(uuid.uuid4())[:23]
project_name33 = str(uuid.uuid4())[:23]
project_name331 = str(uuid.uuid4())[:23]
project_name332 = str(uuid.uuid4())[:23]
task_name333 = str(uuid.uuid4())[:23]
project_name34 = str(uuid.uuid4())[:23]
task_name35 = str(uuid.uuid4())[:23]
task_name4 = str(uuid.uuid4())[:23]
project_name5 = str(uuid.uuid4())[:23]
project_name51 = str(uuid.uuid4())[:23]
project_name6 = str(uuid.uuid4())[:23]
task_name61 = str(uuid.uuid4())[:23]
check_string = (common_func.table_header() + common_func.create_task_str(
    1, 1, task_name1, "P", 0, "   0:00:00", 0, "") +
                common_func.create_project_str(2, 1, project_name2, 3, 3) +
                common_func.create_project_str(3, 2, project_name22, 0, 0) +
                common_func.create_project_str(4, 2, project_name23, 0, 0) +
                common_func.create_project_str(5, 2, project_name24, 0, 0) +
                common_func.create_project_str(6, 1, project_name3, 2, 4) +
                common_func.create_project_str(7, 2, project_name31, 0, 0) +
                common_func.create_task_str(8, 2, task_name32, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(9, 2, project_name33, 2, 3) +
                common_func.create_project_str(10, 3, project_name331, 0, 0) +
                common_func.create_project_str(11, 3, project_name332, 0, 0) +
                common_func.create_task_str(12, 3, task_name333, "P", 0,
                                            "   0:00:00", 0, "") +
                common_func.create_project_str(13, 2, project_name34, 0, 0) +
                common_func.create_project_str(14, 1, project_name5, 1, 1) +