예제 #1
0
def test_contains_no():
    nanotest.test([2, 3, 5, 7, 11]).contains_no(1)
    nanotest.test("nanotest").contains_no("complicated")
예제 #2
0
#!/usr/bin/env python

import os
import sys
sys.path.insert(0, os.path.abspath("."))

from nanotest import test


# Test eq():
test(42).eq(42)

# Test ne():
test(42).ne(4)

# Test gt():
test(42).gt(41)

# Test ge():
test(42).ge(42)
test(42).ge(41)

# Test lt():
test(42).lt(43)

# Test le():
test(42).le(43)
test(42).le(42) 

# Test is_():
test(True).is_(True) 
예제 #3
0
def test_is_not():
    nanotest.test(True).is_not(False) == True
    nanotest.test(False).is_not(True) == True
    nanotest.test(None).is_not("something") == True
예제 #4
0
def test_contains():
    nanotest.test([2, 3, 5, 7, 11]).contains(5)
    nanotest.test("nanotest").contains("test")
예제 #5
0
def test_le():
    nanotest.test(42).le(43) == True
    nanotest.test(42).le(42) == True
예제 #6
0
def test_is_():
    nanotest.test(True).is_(True) == True
    nanotest.test(False).is_(False) == True
    nanotest.test(None).is_(None) == True
예제 #7
0
def test_lt():
    nanotest.test(42).lt(43) == True
예제 #8
0
def test_ge():
    nanotest.test(42).ge(42) == True
    nanotest.test(42).ge(41) == True
예제 #9
0
def test_gt():
    nanotest.test(42).gt(41) == True
예제 #10
0
def test_ne():
    nanotest.test(42).ne(4) == True
예제 #11
0
def test_eq():
    nanotest.test(42).eq(42) == True