コード例 #1
0
ファイル: test.py プロジェクト: danse-inelastic/helloworld
#!/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
ファイル: function.py プロジェクト: iechenyb/python

#数组参数
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
ファイル: test.py プロジェクト: kesara/python-api-trials
 def test_empty_arg(self):
     self.assertEqual(helloworld.hello(''), 'Hello World!')
コード例 #9
0
ファイル: views.py プロジェクト: jstitch/helloworld
def hello(request, lang="en"):
    cad = helloworld.hello(lang)
#    cad = helloworld.hello()
    return render_to_response('hello.html', locals())
コード例 #10
0
ファイル: test.py プロジェクト: kesara/python-api-trials
 def test_largename249(self):
     name = 'a'*249
     with self.assertRaises(helloworld.Error):
         helloworld.hello(name)
コード例 #11
0
ファイル: test.py プロジェクト: kesara/python-api-trials
 def test_no_args(self):
     self.assertEqual(helloworld.hello(), 'Hello World!')
コード例 #12
0
ファイル: test.py プロジェクト: kesara/python-api-trials
 def test_largename248(self):
     name = 'a'*248
     self.assertEqual(helloworld.hello(name), 'Hello {}!'.format(name))
コード例 #13
0
ファイル: test.py プロジェクト: kesara/python-api-trials
 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!')
コード例 #15
0
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())
コード例 #18
0
 def test_hello_world(self):
     result = hello()
     self.assertEqual(result, 'hello')
コード例 #19
0
ファイル: test.py プロジェクト: vmuriart/python-c-extension
#!/usr/bin/env python3

import helloworld

print(helloworld.hello());
print(helloworld.heyman(5, "StarNight"));
print(helloworld.add(5, 6));
help(helloworld);
コード例 #20
0
ファイル: hello.py プロジェクト: danse-inelastic/helloworld
#!/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
ファイル: syspathdemo.py プロジェクト: H6yV7Um/TestPython3
 def test1():
     helloworld.hello("Tom")