本文整理汇总了Python中src.pyquickhelper.loghelper.flog.fLOG函数的典型用法代码示例。如果您正苦于以下问题:Python fLOG函数的具体用法?Python fLOG怎么用?Python fLOG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fLOG函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_guess_type
def test_guess_type(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
l = [
'0002',
'0003',
'0001',
'0',
'0',
'0',
'0',
'0',
'',
'0002',
'0003',
'0001',
'0002',
'0003',
'0001',
'0002',
'0003',
'0001',
'0002',
'0001',
'0002',
'0001']
res = guess_type_list(l)
fLOG(res)
if res != (str # unicode#
, 8):
raise Exception("different: {0}".format(res))
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:33,代码来源:test_log.py
示例2: test_split_cmp_command
def test_split_cmp_command(self) :
fLOG (__file__, self._testMethodName, OutputPrint = __name__ == "__main__")
assert split_cmp_command("ab cd ef") == ["ab", "cd", "ef"]
assert split_cmp_command('ab "cd ef"') == ["ab", 'cd ef']
assert split_cmp_command('"ab cd" ef') == ["ab cd", "ef"]
assert split_cmp_command('"ab" cd ef') == ["ab", "cd", "ef"]
assert split_cmp_command('"ab cd ef"') == ["ab cd ef"]
开发者ID:brint,项目名称:pyquickhelper,代码行数:7,代码来源:test_log_cmd.py
示例3: test_NbImage
def test_NbImage(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
r = NbImage("completion.png")
assert isinstance(r, Image)
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:7,代码来源:test_helper_helpgen.py
示例4: test_cmd_communicate2
def test_cmd_communicate2(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
out, err = run_cmd("dir *.py", shell=True, wait=True, communicate=True)
assert len(out) > 0
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:7,代码来源:test_log.py
示例5: test_cmd_noshell
def test_cmd_noshell(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
out, err = run_cmd("dir", wait=True)
assert len(out) > 0
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:7,代码来源:test_log.py
示例6: test_doctring2html_pandas
def test_doctring2html_pandas(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
html = docstring2html(pandas.read_csv, "rawhtml", fLOG=fLOG)
assert len(html) > 0
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:7,代码来源:test_convert_doc_helper.py
示例7: test_synchronize
def test_synchronize (self) :
fLOG (__file__, self._testMethodName, OutputPrint = __name__ == "__main__")
thispath = os.path.abspath(os.path.split(__file__) [0])
cache = os.path.join (thispath, "temp_synchro" )
if not os.path.exists (cache) : os.mkdir (cache)
remone = os.path.join (cache, "test_log.py")
fLOG("existing file",remone)
if os.path.exists (remone) :
os.remove (remone)
try :
import pysvn
except ImportError :
return
all = []
action = foldermod.synchronize_folder (os.path.join(thispath,"..","ut_loghelper"), cache, hash_size = 0, repo1 = True,
operations = lambda a,b,c : all.append (a))
assert len(all)>0
action = foldermod.synchronize_folder (os.path.join(thispath,"..","ut_loghelper"), cache, hash_size = 0, repo1 = True)
assert os.path.exists (cache)
assert len(os.listdir(cache)) > 0
assert os.path.exists (os.path.join(cache,"data"))
assert len(os.listdir(os.path.join(cache,"data"))) > 0
assert len(action) > 0
开发者ID:brint,项目名称:pyquickhelper,代码行数:27,代码来源:test_folder.py
示例8: test_var
def test_var(self):
fLOG (__file__, self._testMethodName, OutputPrint = __name__ == "__main__")
docstring = """
This class opens a text file as if it were a binary file. It can deal with null characters which are missed by open function.
@var filename file name
@var utf8 decode in utf8
@var errors decoding in utf8 can raise some errors, @see cl str to understand the meaning of this parameter
@var fLOG logging function (@see fn fLOG)
@var _buffer_size read a text file _buffer_size bytes each time
@var _filter function filter, None or return True or False whether a line should considered or not
Example:
@code
f = TextFile (filename)
f.open ()
for line in f :
print line
f.close ()
@endcode
"""
values = process_var_tag(docstring)
assert len(values) == 6
rst = process_var_tag(docstring, True)
fLOG(rst)
assert len(rst) > 0
开发者ID:brint,项目名称:pyquickhelper,代码行数:28,代码来源:test_utils_sphinxdoc2_issues.py
示例9: test_jsdifflib
def test_jsdifflib(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
try:
import pymyinstall
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..",
"..",
"pymyinstall",
"src")))
if path not in sys.path:
sys.path.append(path)
try:
import pymyinstall
except ImportError:
# we skip
warnings.warn("unable to test TestJsDiffLib.test_jsdifflib")
return
tt = os.path.split(
src.pyquickhelper.filehelper.visual_sync.__file__)[0]
ma = tt
p = create_visual_diff_through_html("a", "b")
assert len(p) > 0
assert os.path.exists(os.path.join(ma, "difflib.js"))
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:33,代码来源:test_jsdifflib.py
示例10: test_conf_sphinx
def test_conf_sphinx(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
ff = os.path.abspath(os.path.dirname(__file__))
ff = os.path.join(
ff,
"..",
"..",
"_doc",
"sphinxdoc",
"source",
"conf.py")
if sys.version_info[0] == 2:
return
assert os.path.exists(ff)
import solar_theme
d = {}
set_sphinx_variables(
ff,
"thisname",
"XD",
2014,
"solar_theme",
solar_theme.theme_path,
d)
for k, v in d.items():
fLOG(k, "\t=", v)
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:29,代码来源:test_conf_sphinx.py
示例11: test_load_content_file_with_encoding
def test_load_content_file_with_encoding(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
file = __file__.replace(".pyc", ".py")
cont, enc = load_content_file_with_encoding(file)
assert len(file) > 0
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:8,代码来源:test_log.py
示例12: test_nb_image
def test_nb_image(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
r = NbImage("completion.png")
assert r is not None
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:8,代码来源:test_missing_function.py
示例13: test_logfile
def test_logfile(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
r = GetLogFile()
assert not isinstance(r, str # unicode#
)
开发者ID:pjc42,项目名称:pyquickhelper,代码行数:8,代码来源:test_log.py
示例14: test_file_binary
def test_file_binary (self) :
fLOG (__file__, self._testMethodName, OutputPrint = __name__ == "__main__")
if __name__ == "__main__" :
functions = { "test_regular_expression":test_regular_expression,
"test_edit_distance":file_grep,
"file_head":file_head }
main_loop_functions ( functions, title = "title: TestMakeWindow2")
开发者ID:brint,项目名称:pyquickhelper,代码行数:8,代码来源:test_make_window2.py
注:本文中的src.pyquickhelper.loghelper.flog.fLOG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论