Esempio n. 1
0
def test_contains_no():
    nanotest.test([2, 3, 5, 7, 11]).contains_no(1)
    nanotest.test("nanotest").contains_no("complicated")
Esempio n. 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) 
Esempio n. 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
Esempio n. 4
0
def test_contains():
    nanotest.test([2, 3, 5, 7, 11]).contains(5)
    nanotest.test("nanotest").contains("test")
Esempio n. 5
0
def test_le():
    nanotest.test(42).le(43) == True
    nanotest.test(42).le(42) == True
Esempio n. 6
0
def test_is_():
    nanotest.test(True).is_(True) == True
    nanotest.test(False).is_(False) == True
    nanotest.test(None).is_(None) == True
Esempio n. 7
0
def test_lt():
    nanotest.test(42).lt(43) == True
Esempio n. 8
0
def test_ge():
    nanotest.test(42).ge(42) == True
    nanotest.test(42).ge(41) == True
Esempio n. 9
0
def test_gt():
    nanotest.test(42).gt(41) == True
Esempio n. 10
0
def test_ne():
    nanotest.test(42).ne(4) == True
Esempio n. 11
0
def test_eq():
    nanotest.test(42).eq(42) == True