Ejemplo n.º 1
0
def setup_function(function):
    """
    Runs once before each function in this file.  This is the same as
    XCUnit or CPPUnit testing.
    """
    global mypath
    mypath = os.getcwd()
    global ac
    ac = asset_checker.AssetChecker()
Ejemplo n.º 2
0
def test_init_with_default_values():
    a_asset_checker = asset_checker.AssetChecker()
    assert a_asset_checker.searchable_extensions == \
        ['m4a', 'jpg', 'png', 'ico']
    assert a_asset_checker.search_path == os.getcwd()
    assert a_asset_checker.show_all_output is True
Ejemplo n.º 3
0
def test_init_with_search_path():
    a_asset_checker = asset_checker.AssetChecker(search_path='./home/abc/def')
    assert a_asset_checker.search_path == './home/abc/def'
Ejemplo n.º 4
0
def test_init_with_show_all_output():
    a_asset_checker = asset_checker.AssetChecker(show_all_output=True)
    assert a_asset_checker.show_all_output is True
Ejemplo n.º 5
0
def test_init_with_searchable_extensions():
    a_asset_checker = asset_checker.AssetChecker(searchable_extensions=['gif'])
    assert a_asset_checker.searchable_extensions == ['gif']