8000 Add fixture to write test · angelafunk/python-docs-samples@3d63d6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d63d6a

Browse files
committed
Add fixture to write test
1 parent e12b69f commit 3d63d6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bigtable/snippets/writes/writes_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
TABLE_ID_PREFIX = 'mobile-time-series-{}'
2929

3030

31-
@pytest.fixture(scope="module")
32-
def test_writes(capsys):
31+
@pytest.fixture
32+
def test_writes(capsys, writes):
3333
client = bigtable.Client(project=PROJECT, admin=True)
3434
instance = client.instance(BIGTABLE_INSTANCE)
3535

@@ -62,4 +62,6 @@ def test_writes(capsys):
6262
out, _ = capsys.readouterr()
6363
assert 'Successfully wrote 2 rows' in out
6464

65+
yield writes
66+
6567
table.delete()

0 commit comments

Comments
 (0)
0