Grammalecte  Check-in [17236bc10d]

Overview
Comment:[build] error message for tests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | build
Files: files | file ages | folders
SHA3-256: 17236bc10d231ecc8f13c4f983c5120f21b494705c0e2e9dfd237e02ead949d9
User & Date: olr on 2017-12-18 14:16:11
Other Links: manifest | tags
Context
2017-12-18
14:46
[build] add built data structures within sources check-in: 1cffa1f8c4 user: olr tags: trunk, build
14:16
[build] error message for tests check-in: 17236bc10d user: olr tags: trunk, build
14:04
[doc] first build instructions check-in: 5de20bed38 user: olr tags: trunk, doc
Changes

Modified make.py from [2aed0ffb52] to [29a87bfcf1].

336
337
338
339
340
341
342
343

344
345
346
347
348
349
350
            # tests
            if xArgs.tests or xArgs.perf or xArgs.perf_memo:
                print("> Running tests")
                try:
                    tests = importlib.import_module("grammalecte."+sLang+".tests")
                    print(tests.__file__)
                except ImportError:
                    print("# Error. Couldn't import file {}_test.py in folder tests".format(sLang))

                else:
                    if xArgs.tests:
                        xTestSuite = unittest.TestLoader().loadTestsFromModule(tests)
                        unittest.TextTestRunner().run(xTestSuite)
                    if xArgs.perf or xArgs.perf_memo:
                        hDst = open("./gc_lang/"+sLang+"/perf_memo.txt", "a", encoding="utf-8", newline="\n")  if xArgs.perf_memo  else None
                        tests.perf(sVersion, hDst)







|
>







336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
            # tests
            if xArgs.tests or xArgs.perf or xArgs.perf_memo:
                print("> Running tests")
                try:
                    tests = importlib.import_module("grammalecte."+sLang+".tests")
                    print(tests.__file__)
                except ImportError:
                    print("# Error. Import failed:" + "grammalecte."+sLang+".tests")
                    traceback.print_exc()
                else:
                    if xArgs.tests:
                        xTestSuite = unittest.TestLoader().loadTestsFromModule(tests)
                        unittest.TextTestRunner().run(xTestSuite)
                    if xArgs.perf or xArgs.perf_memo:
                        hDst = open("./gc_lang/"+sLang+"/perf_memo.txt", "a", encoding="utf-8", newline="\n")  if xArgs.perf_memo  else None
                        tests.perf(sVersion, hDst)