Skip to content

Commit c8a6d19

Browse files
Lotramryneeverett
authored andcommitted
Drop unittest base from setup-free tests
1 parent 7ca2a98 commit c8a6d19

5 files changed

Lines changed: 7 additions & 11 deletions

File tree

tests/config/test_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_unsupportedoption_truthy(self):
114114
self.adapter.validate_python('foo')
115115

116116

117-
class TestComputeTemplates(unittest.TestCase):
117+
class TestComputeTemplates:
118118
def test_template(self):
119119
raw_values = {'templates': {}, 'project_template': 'foo'}
120120
computed_values = DumbConfig.compute_templates(raw_values)

tests/config/test_secrets.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import unittest
21
from unittest.mock import MagicMock, patch
32

43
import keyring.errors
@@ -7,12 +6,12 @@
76
from bugwarrior.config import secrets
87

98

10-
class TestOracleEval(unittest.TestCase):
9+
class TestOracleEval:
1110
def test_echo(self):
1211
assert secrets.oracle_eval("echo fööbår") == "fööbår"
1312

1413

15-
class TestGetServicePassword(unittest.TestCase):
14+
class TestGetServicePassword:
1615
"""Tests for get_service_password, covering every oracle code path."""
1716

1817
SERVICE = "myservice"

tests/services/test_github.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from datetime import datetime, timedelta, timezone
2-
from unittest import TestCase
32

43
import responses
54

@@ -358,7 +357,7 @@ def test_issue_urls_valid(self):
358357
self.validate()
359358

360359

361-
class TestGithubClient(TestCase):
360+
class TestGithubClient:
362361
def test_api_url(self):
363362
auth = {'token': 'xxxx'}
364363
client = GithubClient('github.com', auth)

tests/test_docs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import socket
77
import subprocess
88
import tempfile
9-
import unittest
109

1110
import docutils.core
1211
import pytest
@@ -20,7 +19,7 @@
2019
INTERNET = False
2120

2221

23-
class ReadmeTest(unittest.TestCase):
22+
class TestReadme:
2423
def test_service_list(self):
2524
# GET README LISTED SERVICES
2625
def is_services(node):
@@ -53,7 +52,7 @@ def is_services(node):
5352
assert documented_services == readme_listed_services
5453

5554

56-
class DocsTest(unittest.TestCase):
55+
class TestDocs:
5756
@pytest.mark.skipif(not INTERNET, reason='no internet')
5857
def test_docs_build_without_warning(self):
5958
with tempfile.TemporaryDirectory() as buildDir:

tests/test_general.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import subprocess
2-
import unittest
32

43

5-
class TestGeneral(unittest.TestCase):
4+
class TestGeneral:
65
def test_ruff_check(self):
76
subprocess.run(['ruff', 'check'], check=True)
87

0 commit comments

Comments
 (0)