示例#1
0
#!/usr/bin/env python

import helloworld
helloworld.hello("World")
helloworld.hello2("World")
示例#2
0
def test_hello():
    assert helloworld.hello() == 'Hello, World!'
示例#3
0
文件: test.py 项目: ijtest/helloworld
 def test_hello(self):
     self.assertEqual( helloworld.hello(1), "Hello")
示例#4
0

#数组参数
def deduplication(self, nums):  #找出排序数组的索引

    for i in range(len(nums)):
        if nums[i] == self:
            return i
    i = 0
    for x in nums:
        if self > x:
            i += 1
    return i


helloworld.hello('iechenyb 999')
helloworld.print_func('iechenyb')
cal = calendar.month(2016, 1)
print("以下输出2016年1月份的日历:")
print(cal)

# 格式化成2016-03-20 11:45:39形式
print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))

# 格式化成Sat Mar 28 22:24:24 2016形式
print(time.strftime("%a %b %d %H:%M:%S %Y", time.localtime()))

# 将格式字符串转换为时间戳
a = "Sat Mar 28 22:24:24 2016"
print(time.mktime(time.strptime(a, "%a %b %d %H:%M:%S %Y")))
示例#5
0
import helloworld

x = raw_input('Hit enter')
if x == '':
    helloworld.hello()
示例#6
0
# coding=utf8

from helloworld import hello

hw = hello()
hw.printHello()

print('hello world')
示例#7
0
#import the helloworld function
#from helloworld import hello
import helloworld

#call funtion
helloworld.hello()


示例#8
0
 def test_empty_arg(self):
     self.assertEqual(helloworld.hello(''), 'Hello World!')
示例#9
0
def hello(request, lang="en"):
    cad = helloworld.hello(lang)
#    cad = helloworld.hello()
    return render_to_response('hello.html', locals())
示例#10
0
 def test_largename249(self):
     name = 'a'*249
     with self.assertRaises(helloworld.Error):
         helloworld.hello(name)
示例#11
0
 def test_no_args(self):
     self.assertEqual(helloworld.hello(), 'Hello World!')
示例#12
0
 def test_largename248(self):
     name = 'a'*248
     self.assertEqual(helloworld.hello(name), 'Hello {}!'.format(name))
示例#13
0
 def test_args(self):
     names = ['John', 'Jane', 'Jeff' 'J', '\n', '\t']
     for name in names:
         self.assertEqual(
             helloworld.hello(name), 'Hello {}!'.format(name))
示例#14
0
 def test_hello(self):
     self.assertEqual(helloworld.hello(), 'Hello, World!')
def test_HelloWorld(capsys):
    hello()
    printed = capsys.readouterr()
    assert printed.out == "Hello World!\n"
示例#16
0
def test_hello():
    assert hello() == "Hello World!"
示例#17
0
 def test_hello(self):
     self.assertEqual("Hello World.", hello())
 def test_hello_world(self):
     result = hello()
     self.assertEqual(result, 'hello')
示例#19
0
#!/usr/bin/env python3

import helloworld

print(helloworld.hello());
print(helloworld.heyman(5, "StarNight"));
print(helloworld.add(5, 6));
help(helloworld);
示例#20
0
#!/usr/bin/env python

import helloworld, sys

greeter = sys.argv[1]
helloworld.hello(greeter)
helloworld.hello2(greeter)
示例#21
0
 def test_hello(self):
     self.assertEqual(hello(), 'hello im chirchir')
     
示例#22
0
 def test1():
     helloworld.hello("Tom")