Skip to content

Commit

Permalink
Revert "Alter the skipped test to work with bw2test fixture"
Browse files Browse the repository at this point in the history
This reverts commit 68ea93b
  • Loading branch information
dgdekoning committed Dec 10, 2019
1 parent 68ea93b commit d92a361
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
import os

import brightway2 as bw
import pytest

from activity_browser.app.settings import (ABSettings, BaseSettings,
ProjectSettings)
from activity_browser.app.signals import signals


@pytest.fixture()
Expand Down Expand Up @@ -54,12 +54,14 @@ def test_ab_edit_settings(ab_settings):
assert ab_settings.custom_bw_dir != ABSettings.get_default_directory()


def test_ab_existing_startup(qtbot, ab_app, ab_settings, bw2test):
@pytest.mark.skipif("pytest_project" not in bw.projects, reason="test project not created")
def test_ab_existing_startup(ab_settings):
""" Alter the startup project and assert that it is correctly changed.
Will be skipped if test_settings.py is run in isolation because the test
project has not been created (results in duplicate of test below)
"""
with qtbot.waitSignal(signals.projects_changed, timeout=500):
ab_app.controller.new_project("new_test")
ab_settings.startup_project = "new_test"
ab_settings.startup_project = "pytest_project"
assert ab_settings.startup_project != ABSettings.get_default_project_name()


Expand Down

0 comments on commit d92a361

Please sign in to comment.