nosetests

    4熱度

    2回答

    詳細報告格式: .... test_cache_region (tests.test_sysutil.TestCachedMethodDecorator) ... ok test_expire (tests.test_sysutil.TestCachedMethodDecorator) ... ok test_lru (tests.test_sysutil.TestCachedMethodD

    2熱度

    1回答

    我有一個以迭代方式建立的對象。我想要測試每一個步驟。下面是一個不好的測試功能: def test_object: o = object.Object() o.step1() # in place method assert(o.step1property) o.step2() # in place method assert(o.step2prop

    5熱度

    1回答

    我創建這樣一個覆蓋報告: nosetests --with-coverage --cover-html 我.coveragerc文件看起來像這樣: # .coveragerc to control coverage.py [run] branch = True omit = contextlib, ctypes, ctypes._endian, ctypes.util, filecmp,

    3熱度

    1回答

    請考慮以下情形。 import six from abc import ABCMeta, abstractmethod class ThisIsAnAbstractClass(six.with_metaclass(ABCMeta)): @abstractmethod def __init__(self,parameter): self.parameter =

    12熱度

    2回答

    運行特定的測試在以前的版本鼻測試框架,有幾種方法可以只指定所有測試的一個子集: nosetests test.module nosetests another.test:TestCase.test_method nosetests a.test:TestCase nosetests /path/to/test/file.py:test_function http://nose.readt

    3熱度

    2回答

    我正在嘗試爲新的Google App Engine Python應用程序設置單元測試。現在我有這個內容的虛擬tests.py文件: import os import unittest from application import app class LoginTestCase(unittest.TestCase): def test_login_request(self)

    27熱度

    2回答

    使用Django的正常測試運行器,您可以深入到特定應用程序,TestCase的特定子類或TestCase的特定子類中的特定測試中運行測試。 例如爲: ./manage.py test myapp.MyTestCase.test_something 然而,Django的鼻子似乎並不支持任何超出測試特定應用。我如何複製最後兩個行爲?

    0熱度

    2回答

    我有一些測試,我想運行nosetests並生成junit xml結果。據我所知,默認安裝nosetests是不可能的,因爲它只生成xunit xml文件。 但是,存在可以做各種事情的鼻插件,其中有一個code snippet用於創建junit xml輸出。 我的問題: 什麼是junit和xunit XML結果之間的差異?它們基本上不同並且不兼容? 如何在我上面提到的鏈接中安裝或使用junitxml

    0熱度

    1回答

    我已創建包含兩個測試用例一個簡單的測試: # test.py def test_will_pass(): pass def test_will_fail(): assert False 在命令行我可以使用nosetests test.py:test_will_fail只運行第二測試情況。 問題是,我還沒有找到一種方法來創建Eclipse PyDev中的運行配置,實現

    0熱度

    2回答

    我的配置文件看起來像這樣 # function class,dir, file match this regular expression are considered tests [NOSE_TESTMATCH] #by default this is- (?:^|[\b_\./-])[Tt]est # The file names after this block are ignore