File: condition_list.test

package info (click to toggle)
atheist 0.20110402-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,348 kB
  • sloc: python: 4,764; xml: 626; makefile: 113; cpp: 54; ansic: 5; sh: 5
file content (28 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- mode:python; coding:utf-8; tab-width:4 -*-

import sys
import unittest

import atheist

sys.path.append('$testdir')
from atheist_mock import Task

class TestConditionList(unittest.TestCase):
    def test_ignore_condition_duplicates(self):
        task = Task()
        task.post += atheist.FileExists('/some/file')
        task.post += atheist.FileExists('/some/file')

        self.assert_(len(task.post) == 1)


    def test_Not_equality(self):
        e1 = atheist.FileExists('some/file')
        not_e1 = atheist.Not(e1)

        self.assert_(e1 != not_e1)



UnitTestCase(TestConditionList)