Beispiel #1
0
    def test_pos_002(self):
        "BB Basic with one requirement - reqs only from FILES"

        def myexit(n):
            pass

        mout, merr = prepare_result_is_dir()
        main(["-f", mdir + "/input/Config2.py", "-m", ".."], mout, merr,
             exitfun=myexit)
        cleanup_std_log(mout, merr)
        extract_container_files(["reqspricing.ods",])
        missing_files, additional_files, diffs = compare_results(mdir)
        assert(len(missing_files)==0)
        assert(len(additional_files)==0)
        # The count stats is always different because of the timestamp

        if len(diffs)!=1:
            print("DIFFS '%s'" % diffs)

        assert(len(diffs)==1)
        # Diffs are the from the stats count file:
        # ['---  \n', 
        #  '+++  \n', 
        #  '@@ -1,1 +1,5 @@\n', 
        #  '-2010-07-31_06:11:27 1\n', -- or similar
        #  '+2010-07-30_21:04:35 1\n', 
        #  '+2010-07-30_21:03:22 1\n',
        #  '+2010-07-30_20:57:36 1\n',
        #  '+2010-07-29_21:17:15 1\n',
        #  '+2010-07-29_21:09:03 1\n']
        assert(len(diffs["stats_reqs_cnt.csv"])==9)
        delete_result_is_dir()
Beispiel #2
0
    def test_pos_001(self):
        "BB Basic with one requirement - reqs only from git"

        def myexit(n):
            pass

        mout, merr = prepare_result_is_dir()
        main(["-f", mdir + "/input/Config1.py", "-m", ".."], mout, merr,
             exitfun=myexit)
        cleanup_std_log(mout, merr)
        extract_container_files(["reqspricing.ods", ])
        check_file_results(mdir)
        delete_result_is_dir()
Beispiel #3
0
    def test_pos_001(self):
        "BB Basic with some requirements - used for the slides"

        def myexit(n):
            pass

        os.environ["basedir"] = mdir
        mout, merr = prepare_result_is_dir()
        main(["-j", "file://" + mdir + "/input/Config.json"],
             mout, merr, exitfun=myexit)
        extract_container_files(["reqspricing.ods", ])
        cleanup_std_log(mout, merr)
        check_file_results(mdir)
        delete_result_is_dir()
Beispiel #4
0
    def test_pos_001(self):
        "BB Basic with one requirement - reqs only from git"

        os.environ['TZ'] = 'Europe/Berlin'
        time.tzset()

        def myexit(n):
            pass

        os.environ["basedir"] = mdir_orig
        os.environ["rbasedir"] = mdir
        mout, merr = prepare_result_is_dir()
        main(["-j", "file://" + mdir + "/input/Config.json"],
             mout, merr, exitfun=myexit)
        cleanup_std_log(mout, merr)
        extract_container_files(["reqspricing.ods", ])
        check_file_results(mdir)
        delete_result_is_dir()
Beispiel #5
0
    def test_pos_001(self):
        "BB Basic with some requirements - used for the slides"

        def myexit(n):
            pass

        os.environ["basedir"] = mdir
        mout, merr = prepare_result_is_dir()
        main(["-j", "file://" + mdir + "/input/Config.json"],
             mout,
             merr,
             exitfun=myexit)
        extract_container_files([
            "reqspricing.ods",
        ])
        cleanup_std_log(mout, merr)
        check_file_results(mdir)
        delete_result_is_dir()
Beispiel #6
0
    def test_pos_001(self):
        "BB Basic with one requirement - reqs only from git"

        def myexit(n):
            pass

        mout, merr = prepare_result_is_dir()
        main(["-f", mdir + "/input/Config1.py", "-m", ".."], mout, merr,
             exitfun=myexit)
        cleanup_std_log(mout, merr)
        extract_container_files(["reqspricing.ods",])
        missing_files, additional_files, diffs = compare_results(mdir)
        assert(len(missing_files)==0)
        assert(len(additional_files)==0)

        if len(diffs)!=0:
            print("DIFFS '%s'" % diffs)

        assert(len(diffs)==0)
        delete_result_is_dir()
Beispiel #7
0
    def test_pos_001(self):
        "BB Basic with some requirements - used for the slides"

        def myexit(n):
            pass

        mout, merr = prepare_result_is_dir()
        main(["-f", mdir + "/input/Config1.py", "-m", ".."], mout, merr,
             exitfun=myexit)
        cleanup_std_log(mout, merr)
        extract_container_files(["reqspricing.ods",])
        missing_files, additional_files, diffs = compare_results(mdir)

        assert(len(missing_files)==0)
        assert(len(additional_files)==0)

        # There must be a diff - because the estimated end date 
        # is also based on the date of today
        if len(diffs)!=2:
            print("DIFFS '%s'" % diffs)

        assert(len(diffs)==2)
Beispiel #8
0
    def test_pos_001(self):
        "BB Basic with one requirement - reqs only from git"

        os.environ['TZ'] = 'Europe/Berlin'
        time.tzset()

        def myexit(n):
            pass

        os.environ["basedir"] = mdir_orig
        os.environ["rbasedir"] = mdir
        mout, merr = prepare_result_is_dir()
        main(["-j", "file://" + mdir + "/input/Config.json"],
             mout,
             merr,
             exitfun=myexit)
        cleanup_std_log(mout, merr)
        extract_container_files([
            "reqspricing.ods",
        ])
        check_file_results(mdir)
        delete_result_is_dir()