déplacer les librairies dans lib/
This commit is contained in:
18
lib/pyulib/test/test_base/__init__.py
Normal file
18
lib/pyulib/test/test_base/__init__.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
import test_base
|
||||
import test_args
|
||||
import test_config
|
||||
import test_control
|
||||
|
||||
def suite():
|
||||
from base import TestSuite
|
||||
ts = TestSuite()
|
||||
ts.addTest(test_base.suite())
|
||||
ts.addTest(test_args.suite())
|
||||
ts.addTest(test_config.suite())
|
||||
ts.addTest(test_control.suite())
|
||||
return ts
|
||||
21
lib/pyulib/test/test_base/base.py
Normal file
21
lib/pyulib/test/test_base/base.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('TC',
|
||||
'TestLoader',
|
||||
'main',
|
||||
)
|
||||
|
||||
from unittest import TestCase, TestSuite, TestLoader, main #@UnusedImport
|
||||
|
||||
class TC(TestCase):
|
||||
eq = TestCase.failUnlessEqual
|
||||
ist = TestCase.failUnless
|
||||
isf = TestCase.failIf
|
||||
ex = TestCase.failUnlessRaises
|
||||
|
||||
def tf(self):
|
||||
eq = self.failUnlessEqual
|
||||
ist = self.failUnless
|
||||
isf = self.failIf
|
||||
ex = self.failUnlessRaises
|
||||
return eq, ist, isf, ex
|
||||
13
lib/pyulib/test/test_base/test.config
Normal file
13
lib/pyulib/test/test_base/test.config
Normal file
@@ -0,0 +1,13 @@
|
||||
var0=value0
|
||||
var1="value1"
|
||||
var2='value2'
|
||||
var3="\
|
||||
value30
|
||||
value31
|
||||
"
|
||||
var4="
|
||||
value40
|
||||
value41"
|
||||
var5="value50:value51"
|
||||
var6=" value60 : value61 "
|
||||
var7="$X ${X} \" \\ \$ \`"
|
||||
13
lib/pyulib/test/test_base/test.sh_config
Normal file
13
lib/pyulib/test/test_base/test.sh_config
Normal file
@@ -0,0 +1,13 @@
|
||||
var0=value0
|
||||
var1="value1"
|
||||
var2='value2'
|
||||
var3="\
|
||||
value30
|
||||
value31
|
||||
"
|
||||
var4="
|
||||
value40
|
||||
value41"
|
||||
var5="value50:value51"
|
||||
var6=" value60 : value61 "
|
||||
var7="$X ${X} \" \\ \$ \`"
|
||||
47
lib/pyulib/test/test_base/test_args.py
Executable file
47
lib/pyulib/test/test_base/test_args.py
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
from utools.base.args import split_args, join_args, build_options
|
||||
|
||||
class ClassTest(TC):
|
||||
def test_split_args(self):
|
||||
eq = self.assertEqual
|
||||
eq(None, split_args(None))
|
||||
eq([], split_args(""))
|
||||
eq([], split_args(" "))
|
||||
eq(["a"], split_args(" a"))
|
||||
eq(["a"], split_args("a "))
|
||||
eq(["a"], split_args(" a "))
|
||||
eq(['a', 'b c', "'d", "e'", 'a"b'],
|
||||
split_args(r'''a "b c" 'd e' "a\"b"'''))
|
||||
|
||||
def test_join_args(self):
|
||||
eq = self.assertEqual
|
||||
eq(None, join_args(None))
|
||||
eq('', join_args([]))
|
||||
eq('a', join_args(["a"]))
|
||||
eq('" a"', join_args([" a"]))
|
||||
eq('"a "', join_args(["a "]))
|
||||
eq('" a "', join_args([" a "]))
|
||||
eq(r'''a "b c" 'd e' "a\"b"''',
|
||||
join_args(['a', 'b c', "'d", "e'", 'a"b']))
|
||||
|
||||
def test_build_options(self):
|
||||
eq = self.assertEqual
|
||||
eq(('ab:c', ['aaa', 'bbb=', 'cc', 'ccc']),
|
||||
build_options([('a', 'aaa', 'whatever'),
|
||||
('b:', 'bbb=', None),
|
||||
('c', ['cc', 'ccc'], None),
|
||||
]))
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
330
lib/pyulib/test/test_base/test_base.py
Executable file
330
lib/pyulib/test/test_base/test_base.py
Executable file
@@ -0,0 +1,330 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
from utools.base.version import check_version
|
||||
from utools.base.base import sorted, updated, isnum, isbool, isseq
|
||||
from utools.base.base import seqof, firstof, isbytes, isunicode, isstr
|
||||
from utools.base.base import all_matches, one_match, strip_nl, norm_nl
|
||||
from utools.base.base import getattrs
|
||||
|
||||
class ClassTest(TC):
|
||||
def test_sorted(self):
|
||||
eq, _, _, _ = self.tf()
|
||||
eq([1,2,3], sorted([3,2,1]))
|
||||
|
||||
def test_updated(self):
|
||||
eq, ist, isf, _ = self.tf()
|
||||
|
||||
eq({"n": "v"}, updated(None, n="v"))
|
||||
eq({"n": "v"}, updated({}, n="v"))
|
||||
|
||||
d = {"k": "v"}
|
||||
eq({"n": "v", "k": "v"}, updated(d, n="v"))
|
||||
|
||||
d = {"n": "v"}
|
||||
eq({"n": "v"}, updated(d, n="v"))
|
||||
ist(d == updated(d, n="v"))
|
||||
isf(d is updated(d, n="v"))
|
||||
|
||||
def test_isnum(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
ist(isnum(0))
|
||||
ist(isnum(0L))
|
||||
isf(isnum(None))
|
||||
isf(isnum(True))
|
||||
isf(isnum(False))
|
||||
isf(isnum("str"))
|
||||
isf(isnum(u"unicode"))
|
||||
isf(isnum(()))
|
||||
isf(isnum([]))
|
||||
|
||||
def test_isbool(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
isf(isbool(0))
|
||||
isf(isbool(0L))
|
||||
isf(isbool(None))
|
||||
ist(isbool(True))
|
||||
ist(isbool(False))
|
||||
isf(isbool("str"))
|
||||
isf(isbool(u"unicode"))
|
||||
isf(isbool(()))
|
||||
isf(isbool([]))
|
||||
|
||||
def test_isseq(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
isf(isseq(0))
|
||||
isf(isseq(0L))
|
||||
isf(isseq(None))
|
||||
isf(isseq(True))
|
||||
isf(isseq(False))
|
||||
isf(isseq("str"))
|
||||
isf(isseq(u"unicode"))
|
||||
ist(isseq(()))
|
||||
ist(isseq([]))
|
||||
|
||||
def test_seqof(self):
|
||||
eq, ist, _, _ = self.tf()
|
||||
|
||||
et = ()
|
||||
t = (1,2,3)
|
||||
el = []
|
||||
l = [1,2,3]
|
||||
|
||||
eq([0], seqof(0))
|
||||
eq([0L], seqof(0L))
|
||||
eq([None], seqof(None))
|
||||
eq([True], seqof(True))
|
||||
eq([False], seqof(False))
|
||||
eq(["str"], seqof("str"))
|
||||
ist(isbytes(seqof("str")[0]))
|
||||
eq([u"unicode"], seqof(u"unicode"))
|
||||
ist(isunicode(seqof(u"unicode")[0]))
|
||||
eq(t, seqof(t))
|
||||
eq(l, seqof(l))
|
||||
ist(t is seqof(t))
|
||||
ist(l is seqof(l))
|
||||
eq(et, seqof(et))
|
||||
eq(el, seqof(el))
|
||||
ist(et is seqof(et))
|
||||
ist(el is seqof(el))
|
||||
|
||||
eq(t, seqof(None, t))
|
||||
eq(l, seqof(None, l))
|
||||
ist(t is seqof(None, t))
|
||||
ist(l is seqof(None, l))
|
||||
eq(et, seqof(None, et))
|
||||
eq(el, seqof(None, el))
|
||||
ist(et is seqof(None, et))
|
||||
ist(el is seqof(None, el))
|
||||
|
||||
def test_firstof(self):
|
||||
eq, _, _, _ = self.tf()
|
||||
|
||||
et = ()
|
||||
t = (1,2,3)
|
||||
el = []
|
||||
l = [1,2,3]
|
||||
|
||||
eq(None, firstof(et))
|
||||
eq(None, firstof(el))
|
||||
eq(1, firstof(t))
|
||||
eq(1, firstof(l))
|
||||
eq(0, firstof(0))
|
||||
eq(0L, firstof(0L))
|
||||
eq(None, firstof(None))
|
||||
eq(True, firstof(True))
|
||||
eq(False, firstof(False))
|
||||
eq("str", firstof("str"))
|
||||
eq(u"unicode", firstof(u"unicode"))
|
||||
|
||||
def test_isbytes(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
isf(isbytes(0))
|
||||
isf(isbytes(0L))
|
||||
isf(isbytes(None))
|
||||
isf(isbytes(True))
|
||||
isf(isbytes(False))
|
||||
ist(isbytes("str"))
|
||||
isf(isbytes(u"unicode"))
|
||||
isf(isbytes(()))
|
||||
isf(isbytes([]))
|
||||
|
||||
def test_isunicode(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
isf(isunicode(0))
|
||||
isf(isunicode(0L))
|
||||
isf(isunicode(None))
|
||||
isf(isunicode(True))
|
||||
isf(isunicode(False))
|
||||
isf(isunicode("str"))
|
||||
ist(isunicode(u"unicode"))
|
||||
isf(isunicode(()))
|
||||
isf(isunicode([]))
|
||||
|
||||
def test_isstr(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
isf(isstr(0))
|
||||
isf(isstr(0L))
|
||||
isf(isstr(None))
|
||||
isf(isstr(True))
|
||||
isf(isstr(False))
|
||||
ist(isstr("str"))
|
||||
ist(isstr(u"unicode"))
|
||||
isf(isstr(()))
|
||||
isf(isstr([]))
|
||||
|
||||
def test_all_matches(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
l1 = [1,2,3]
|
||||
l2 = [-3,-2,-1,1,2,3]
|
||||
l3 = [-3,-2,-1]
|
||||
positive = lambda n: n>0
|
||||
|
||||
ist(all_matches(positive, l1))
|
||||
isf(all_matches(positive, l2))
|
||||
isf(all_matches(positive, l3))
|
||||
ist(all_matches(positive, 1))
|
||||
isf(all_matches(positive, -1))
|
||||
|
||||
def test_one_match(self):
|
||||
_, ist, isf, _ = self.tf()
|
||||
|
||||
l1 = [1,2,3]
|
||||
l2 = [-3,-2,-1,1,2,3]
|
||||
l3 = [-3,-2,-1]
|
||||
positive = lambda n: n>0
|
||||
|
||||
ist(one_match(positive, l1))
|
||||
ist(one_match(positive, l2))
|
||||
isf(one_match(positive, l3))
|
||||
ist(one_match(positive, 1))
|
||||
isf(one_match(positive, -1))
|
||||
|
||||
def test_strip_nl(self):
|
||||
eq, ist, _, _ = self.tf()
|
||||
|
||||
eq(None, strip_nl(None))
|
||||
eq("", strip_nl(""))
|
||||
ist(isbytes(strip_nl("")))
|
||||
eq(u"", strip_nl(u""))
|
||||
ist(isunicode(strip_nl(u"")))
|
||||
|
||||
eq("str", strip_nl("str"))
|
||||
ist(isbytes(strip_nl("str")))
|
||||
eq(u"unicode", strip_nl(u"unicode"))
|
||||
ist(isunicode(strip_nl(u"unicode")))
|
||||
|
||||
eq("str", strip_nl("str\r"))
|
||||
ist(isbytes(strip_nl("str\r")))
|
||||
eq(u"unicode", strip_nl(u"unicode\r"))
|
||||
ist(isunicode(strip_nl(u"unicode\r")))
|
||||
|
||||
eq("str", strip_nl("str\r\n"))
|
||||
ist(isbytes(strip_nl("str\r\n")))
|
||||
eq(u"unicode", strip_nl(u"unicode\r\n"))
|
||||
ist(isunicode(strip_nl(u"unicode\r\n")))
|
||||
|
||||
eq("str", strip_nl("str\n"))
|
||||
ist(isbytes(strip_nl("str\n")))
|
||||
eq(u"unicode", strip_nl(u"unicode\n"))
|
||||
ist(isunicode(strip_nl(u"unicode\n")))
|
||||
|
||||
eq("str\n", strip_nl("str\n\n"))
|
||||
ist(isbytes(strip_nl("str\n\n")))
|
||||
eq(u"unicode\n", strip_nl(u"unicode\n\n"))
|
||||
ist(isunicode(strip_nl(u"unicode\n\n")))
|
||||
|
||||
eq("str\r\n", strip_nl("str\r\n\n"))
|
||||
ist(isbytes(strip_nl("str\r\n\n")))
|
||||
eq(u"unicode\r\n", strip_nl(u"unicode\r\n\n"))
|
||||
ist(isunicode(strip_nl(u"unicode\r\n\n")))
|
||||
|
||||
def test_norm_nl(self):
|
||||
eq, ist, _, _ = self.tf()
|
||||
|
||||
eq(None, norm_nl(None))
|
||||
eq("", norm_nl(""))
|
||||
ist(isbytes(norm_nl("")))
|
||||
eq(u"", norm_nl(u""))
|
||||
if check_version("2.5"): ist(isunicode(norm_nl(u"")))
|
||||
elif check_version("2.4"): ist(isbytes(norm_nl(u"")))
|
||||
elif check_version("2.3"): ist(isbytes(norm_nl(u"")))
|
||||
|
||||
eq("str", norm_nl("str"))
|
||||
ist(isbytes(norm_nl("str")))
|
||||
eq(u"unicode", norm_nl(u"unicode"))
|
||||
ist(isunicode(norm_nl(u"unicode")))
|
||||
|
||||
eq("str\n", norm_nl("str\r"))
|
||||
ist(isbytes(norm_nl("str\r")))
|
||||
eq(u"unicode\n", norm_nl(u"unicode\r"))
|
||||
ist(isunicode(norm_nl(u"unicode\r")))
|
||||
|
||||
eq("str\n", norm_nl("str\r\n"))
|
||||
ist(isbytes(norm_nl("str\r\n")))
|
||||
eq(u"unicode\n", norm_nl(u"unicode\r\n"))
|
||||
ist(isunicode(norm_nl(u"unicode\r\n")))
|
||||
|
||||
eq("str\n", norm_nl("str\n"))
|
||||
ist(isbytes(norm_nl("str\n")))
|
||||
eq(u"unicode\n", norm_nl(u"unicode\n"))
|
||||
ist(isunicode(norm_nl(u"unicode\n")))
|
||||
|
||||
eq("str\n\n", norm_nl("str\n\n"))
|
||||
ist(isbytes(norm_nl("str\n\n")))
|
||||
eq(u"unicode\n\n", norm_nl(u"unicode\n\n"))
|
||||
ist(isunicode(norm_nl(u"unicode\n\n")))
|
||||
|
||||
eq("str\n\n", norm_nl("str\r\n\n"))
|
||||
ist(isbytes(norm_nl("str\r\n\n")))
|
||||
eq(u"unicode\n\n", norm_nl(u"unicode\r\n\n"))
|
||||
ist(isunicode(norm_nl(u"unicode\r\n\n")))
|
||||
|
||||
def test_make_getter(self): pass
|
||||
def test_make_setter(self): pass
|
||||
def test_make_deleter(self): pass
|
||||
def test_make_prop(self): pass
|
||||
|
||||
def test_getattrs(self):
|
||||
eq, _, _, ex = self.tf()
|
||||
|
||||
class O(object): pass
|
||||
a=O()
|
||||
a.b=O()
|
||||
a.b.c=O()
|
||||
a.x=1
|
||||
a.n=None
|
||||
a.b.y=2
|
||||
a.b.n=None
|
||||
a.b.c.z=3
|
||||
a.b.c.n=None
|
||||
|
||||
eq(1, getattrs(a, "x"))
|
||||
ex(AttributeError, getattrs, a, "x.m")
|
||||
eq(None, getattrs(a, "n"))
|
||||
eq(None, getattrs(a, "n.m"))
|
||||
eq(2, getattrs(a, "b.y"))
|
||||
ex(AttributeError, getattrs, a, "b.y.m")
|
||||
eq(None, getattrs(a, "b.n"))
|
||||
eq(None, getattrs(a, "b.n.m"))
|
||||
eq(3, getattrs(a, "b.c.z"))
|
||||
ex(AttributeError, getattrs, a, "b.c.z.m")
|
||||
eq(None, getattrs(a, "b.c.n"))
|
||||
eq(None, getattrs(a, "b.c.n.m"))
|
||||
|
||||
eq(1, getattrs(a, "x", True))
|
||||
ex(AttributeError, getattrs, a, "x.m", True)
|
||||
eq(None, getattrs(a, "n", True))
|
||||
ex(AttributeError, getattrs, a, "n.m", True)
|
||||
eq(2, getattrs(a, "b.y", True))
|
||||
ex(AttributeError, getattrs, a, "b.y.m", True)
|
||||
eq(None, getattrs(a, "b.n", True))
|
||||
ex(AttributeError, getattrs, a, "b.n.m", True)
|
||||
eq(3, getattrs(a, "b.c.z", True))
|
||||
ex(AttributeError, getattrs, a, "b.c.z.m", True)
|
||||
eq(None, getattrs(a, "b.c.n", True))
|
||||
ex(AttributeError, getattrs, a, "b.c.n.m", True)
|
||||
|
||||
def test_setattrs(self): pass
|
||||
def test_delattrs(self): pass
|
||||
def test_make_delegate(self): pass
|
||||
def test_get__all__(self): pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
84
lib/pyulib/test/test_base/test_config.py
Executable file
84
lib/pyulib/test/test_base/test_config.py
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
import os
|
||||
from os import path
|
||||
|
||||
from base import TC
|
||||
from utools.base.config import ConfigFile, ShConfigFile #, PListFile
|
||||
|
||||
class ClassTest(TC):
|
||||
def tf(self):
|
||||
eq = self.failUnlessEqual
|
||||
ist = self.failUnless
|
||||
isf = self.failIf
|
||||
ex = self.failUnlessRaises
|
||||
return eq, ist, isf, ex
|
||||
|
||||
def get_file(self, name):
|
||||
return path.join(path.split(__file__)[0], name)
|
||||
|
||||
def test_config(self):
|
||||
eq, _, _, _ = self.tf()
|
||||
cf = ConfigFile(self.get_file("test.config"))
|
||||
eq("value0", cf.get("var0"))
|
||||
eq("value1", cf.get("var1"))
|
||||
eq("value2", cf.get("var2"))
|
||||
eq("\\\nvalue30\nvalue31\n", cf.get("var3"))
|
||||
eq("\nvalue40\nvalue41", cf.get("var4"))
|
||||
eq("value50:value51", cf.get("var5"))
|
||||
eq(" value60 : value61 ", cf.get("var6"))
|
||||
eq("$X ${X} \\\" \\\\ \\$ \\`", cf.get("var7"))
|
||||
|
||||
eq(["\\", "value30", "value31", ""], cf.get_list("var3"))
|
||||
eq(["", "value40", "value41"], cf.get_list("var4"))
|
||||
eq(["value50", "value51"], cf.get_paths("var5"))
|
||||
eq([" value60 ", " value61 "], cf.get_paths("var6"))
|
||||
|
||||
eq(["\\", "value30", "value31"], cf.get_list("var3", True))
|
||||
eq(["value40", "value41"], cf.get_list("var4", True))
|
||||
eq(["value50", "value51"], cf.get_paths("var5", True))
|
||||
eq(["value60", "value61"], cf.get_paths("var6", True))
|
||||
|
||||
def test_sh_config(self):
|
||||
eq, _, _, _ = self.tf()
|
||||
|
||||
if os.environ.has_key("X"): del os.environ["X"]
|
||||
cf = ShConfigFile(self.get_file("test.sh_config"))
|
||||
eq("value0", cf.get("var0"))
|
||||
eq("value1", cf.get("var1"))
|
||||
eq("value2", cf.get("var2"))
|
||||
eq("value30\nvalue31\n", cf.get("var3"))
|
||||
eq("\nvalue40\nvalue41", cf.get("var4"))
|
||||
eq("value50:value51", cf.get("var5"))
|
||||
eq(" value60 : value61 ", cf.get("var6"))
|
||||
eq(" \" \\ $ \\`", cf.get("var7"))
|
||||
|
||||
eq(["value30", "value31", ""], cf.get_list("var3"))
|
||||
eq(["", "value40", "value41"], cf.get_list("var4"))
|
||||
eq(["value50", "value51"], cf.get_paths("var5"))
|
||||
eq([" value60 ", " value61 "], cf.get_paths("var6"))
|
||||
|
||||
eq(["value30", "value31"], cf.get_list("var3", True))
|
||||
eq(["value40", "value41"], cf.get_list("var4", True))
|
||||
eq(["value50", "value51"], cf.get_paths("var5", True))
|
||||
eq(["value60", "value61"], cf.get_paths("var6", True))
|
||||
|
||||
os.environ["X"] = "valueX"
|
||||
cf = ShConfigFile(self.get_file("test.sh_config"))
|
||||
eq("valueX valueX \" \\ $ \\`", cf.get("var7"))
|
||||
|
||||
def test_plist(self):
|
||||
#XXX test PListFile
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_control.py
Executable file
20
lib/pyulib/test/test_base/test_control.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
from utools.base.control import Exit, exit
|
||||
|
||||
class ClassTest(TC):
|
||||
def test_exit(self):
|
||||
self.ex(Exit, exit)
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_dates.py
Executable file
20
lib/pyulib/test/test_base/test_dates.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.dates
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_editor.py
Executable file
20
lib/pyulib/test/test_base/test_editor.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.editor
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_encdetect.py
Executable file
20
lib/pyulib/test/test_base/test_encdetect.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.encdetect
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_encoding.py
Executable file
20
lib/pyulib/test/test_base/test_encoding.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.encoding
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_env.py
Executable file
20
lib/pyulib/test/test_base/test_env.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.env
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_files.py
Executable file
20
lib/pyulib/test/test_base/test_files.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.files
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_flock.py
Executable file
20
lib/pyulib/test/test_base/test_flock.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.flock
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_functions.py
Executable file
20
lib/pyulib/test/test_base/test_functions.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.functions
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_input.py
Executable file
20
lib/pyulib/test/test_base/test_input.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.input
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_iso8859.py
Executable file
20
lib/pyulib/test/test_base/test_iso8859.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.iso8859
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_lines.py
Executable file
20
lib/pyulib/test/test_base/test_lines.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.lines
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_output.py
Executable file
20
lib/pyulib/test/test_base/test_output.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.output
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_pager.py
Executable file
20
lib/pyulib/test/test_base/test_pager.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.pager
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_paths.py
Executable file
20
lib/pyulib/test/test_base/test_paths.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.paths
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_procs.py
Executable file
20
lib/pyulib/test/test_base/test_procs.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.procs
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_times.py
Executable file
20
lib/pyulib/test/test_base/test_times.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.times
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_tmpfiles.py
Executable file
20
lib/pyulib/test/test_base/test_tmpfiles.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.tmpfiles
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_uio.py
Executable file
20
lib/pyulib/test/test_base/test_uio.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.uio
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
20
lib/pyulib/test/test_base/test_words.py
Executable file
20
lib/pyulib/test/test_base/test_words.py
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
__all__ = ('suite',
|
||||
)
|
||||
|
||||
from base import TC
|
||||
import utools.base.words
|
||||
|
||||
class ClassTest(TC):
|
||||
def test(self):
|
||||
pass
|
||||
|
||||
def suite():
|
||||
from base import TestLoader
|
||||
return TestLoader().loadTestsFromTestCase(ClassTest)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from base import main
|
||||
main()
|
||||
Reference in New Issue
Block a user