Example #1
0
    def test_noexclude_misc_path(self):
        "Check that tests/tst_exclude1.py is covered, if no excl specified"
        figleaf.init(None, None)
        figleaf.start()

        execfile('tests/tst_exclude1.py')

        figleaf.stop()

        coverage = figleaf.get_data().gather_files()

        assert 'tests/tst_exclude1.py' in coverage.keys()
Example #2
0
    def test_include_misc_path(self):
        "Check that tests/tst_include1.py is the only thing covered, if set"
        figleaf.init(None, 'tests')
        figleaf.start()

        execfile('tests/tst_include1.py')

        figleaf.stop()

        coverage = figleaf.get_data().gather_files()

        assert 'tests/tst_include1.py' in coverage.keys()
        assert len(coverage) == 1
Example #3
0
    def test_exclude_misc_path(self):
        "Check that tests/tst_exclude1.py is not covered, if excl specified"


        testspath = os.path.abspath('tests/')
        print 'IGNORING', testspath
        
        figleaf.init(testspath, None)
        figleaf.start()

        execfile('tests/tst_exclude1.py')

        figleaf.stop()

        coverage = figleaf.get_data().gather_files()

        print coverage.keys()
        assert not 'tests/tst_exclude1.py' in coverage.keys()