- Ideally switch this to use pytest this is a temporary test engine
- Open
test_fuzzybear - Add a new command line argument for your test
# ... #
parser.add_argument('-P', '--your-test',
dest = 'test-name',
action='store_true',
help = 'what is your test for'
)
## Add command line args for your test ^- Define a function for your test
########################## :: [DEFINE TESTS] :: ##########################
# test desc
def test_name():
TEST_DIR = './tests/'
TEST_FILE = f'{TEST_DIR}/target-bins/<binary>'
TEST_SAMPLE = f'{TEST_DIR}/target-ins/<codec>'
print(f"""
[>>] Running test against {TEST_FILE.split('/')[-1]} with {TEST_SAMPLE.split('/')[-1]}
""")
# >-> test body <-<- Import any required files
## <name> Test ##
from fuzzybear.<subdir> import <file/class>
## ADD TEST IMPORT ## ^- Use it in your test body like
# >-> test body <-<
csv_worker = CSV.CSV(TEST_FILE)./test_fuzzybear -h
____ _____ _____ ____ _____ _____ _ _ ____________ __
\ \ \ |_ _| ____/ ___|_ _| | ___| | | |__ /__ /\ \ / /
\ \ \ | | | _| \___ \ | | | |_ | | | | / / / / \ V /
/ / / | | | |___ ___) || | | _| | |_| |/ /_ / /_ | |
/_/_/ |_| |_____|____/ |_| |_| \___//____/____| |_|
____ _____ _ ____
| __ )| ____| / \ | _ \
| _ \| _| / _ \ | |_) |
| |_) | |___ / ___ \| _ <
|____/|_____/_/ \_\_| \_
usage: test_fuzzybear [-h] [-H] [-CSV]
optional arguments:
-h, --help show this help message and exit
-H, --harness test harness
-CSV, --CSV-codec test the csv codec binaries
- To run the
CSVtest for example./test_fuzzybear -CSV