Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

Tests should use a separate shelve test database#14

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions19-dyn-attr-prop/oscon/test_schedule1.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
import os
import shelve

import pytest

import schedule1 as schedule

DB_NAME = 'data/test_db'


@pytest.yield_fixture
@pytest.fixture(scope='module')
def db():
with shelve.open(schedule.DB_NAME) as the_db:
with shelve.open(DB_NAME) as the_db:
if schedule.CONFERENCE not in the_db:
schedule.load_db(the_db)
yield the_db
os.remove(DB_NAME)


def test_record_class():
Expand Down
7 changes: 5 additions & 2 deletions19-dyn-attr-prop/oscon/test_schedule2.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
import os
import shelve

import pytest

import schedule2 as schedule


@pytest.yield_fixture
@pytest.fixture(scope='module')
def db():
with shelve.open(schedule.DB_NAME) as the_db:
with shelve.open(DB_NAME) as the_db:
if schedule.CONFERENCE not in the_db:
schedule.load_db(the_db)
yield the_db
os.remove(DB_NAME)


def test_record_attr_access():
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp