-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunTestsAll.py
32 lines (24 loc) · 865 Bytes
/
runTestsAll.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 16 12:19:11 2019
@author: ubuntu1804
"""
import pygad
import doctest
import warnings
import sys
# monkey patch check_output to doctest.OutputChecker.check_output
from doctest import OutputChecker
from pygad.doctest import check_output_numbers
OutputChecker.check_output = check_output_numbers
warnings.filterwarnings("ignore")
print("*********************************************************************")
print("pygad version ", pygad.__version__)
print("*********************************************************************")
pygad.environment.verbose = pygad.environment.VERBOSE_NORMAL
print("running pygad doctest...")
res = doctest.testmod(pygad)
print("*********************************************************************")
print("return code = ", res.failed)
sys.exit(res.failed)