コード例 #1
0
def test_is_date():
    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)
    cell.value = datetime.now()
    assert cell.is_date() == True
    cell.value = 'testme'
    assert 'testme' == cell.value
    assert cell.is_date() is False
コード例 #2
0
def test_is_date():
    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)
    cell.value = datetime.now()
    eq_(cell.is_date(), True)
    cell.value = 'testme'
    eq_('testme', cell.value)
    assert cell.is_date() is False
コード例 #3
0
ファイル: test_cell.py プロジェクト: waitalone/openpyxl
def test_is_date():
    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)
    cell.value = datetime.now()
    eq_(cell.is_date(), True)
    cell.value = 'testme'
    eq_('testme', cell.value)
    eq_(cell.is_date(), False)
コード例 #4
0
ファイル: test_cell.py プロジェクト: tongjianjun/openpyxl
def test_is_date():
    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)
    cell.value = datetime.now()
    assert cell.is_date() == True
    cell.value = 'testme'
    assert 'testme' == cell.value
    assert cell.is_date() is False
コード例 #5
0
ファイル: test_cell.py プロジェクト: ZhouX1ang/xls2proto
def test_is_date():
    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, "A", 1)
    cell.value = datetime.now()
    eq_(cell.is_date(), True)
    cell.value = "testme"
    eq_("testme", cell.value)
    eq_(cell.is_date(), False)
コード例 #6
0
def test_is_not_date_color_format():

    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)

    cell.value = -13.5
    cell.style.number_format.format_code = '0.00_);[Red]\(0.00\)'

    assert cell.is_date() is False
コード例 #7
0
ファイル: test_cell.py プロジェクト: waitalone/openpyxl
def test_is_not_date_color_format():

    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)

    cell.value = -13.5
    cell.style.number_format.format_code = '0.00_);[Red]\(0.00\)'

    eq_(cell.is_date(), False)
コード例 #8
0
ファイル: test_cell.py プロジェクト: PREM1980/onlineshop
def test_is_not_date_color_format():

    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)

    cell.value = -13.5
    cell.style = cell.style.copy(number_format=NumberFormat('0.00_);[Red]\(0.00\)'))

    assert cell.is_date() is False
コード例 #9
0
def test_is_not_date_color_format():

    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, 'A', 1)

    cell.value = -13.5
    cell.style = cell.style.copy(number_format='0.00_);[Red]\(0.00\)')

    assert cell.is_date() is False
コード例 #10
0
ファイル: test_cell.py プロジェクト: ZhouX1ang/xls2proto
def test_is_not_date_color_format():

    wb = Workbook()
    ws = Worksheet(wb)
    cell = Cell(ws, "A", 1)

    cell.value = -13.5
    cell.style.number_format.format_code = "0.00_);[Red]\(0.00\)"

    eq_(cell.is_date(), False)