18 lines
583 B
Python
Executable File
18 lines
583 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from os.path import dirname as directory_name
|
|
from os.path import abspath as path_absolute
|
|
from os.path import exists as path_exists
|
|
from sys import argv as arguments
|
|
|
|
if len(arguments) > 1:
|
|
test = arguments[1].lower()
|
|
file = directory_name(path_absolute(__file__)) + "/../Tests/" + test + ".py"
|
|
if path_exists(file):
|
|
with open(file, "rb") as data:
|
|
exec(compile(data.read(), test + ".py", "exec"), globals())
|
|
else:
|
|
print("The test '" + test + "' is not exists.")
|
|
|
|
# ltp = LibreTranslatePlus() |