Skip to content

Commit

Permalink
chore: fix some pytest warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
genodeftest committed Jul 30, 2023
1 parent 674a69f commit 74e994e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/xl/trax/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_search_result_track():


class TestMatcher:
def setup(self):
def setup_method(self):
self.strack = get_search_result_track()
self.strack.track.set_tag_raw('artist', ['foo', 'bar'])

Expand Down Expand Up @@ -54,7 +54,7 @@ def test_matches(self):


class TestExactMatcher:
def setup(self):
def setup_method(self):
self.str = get_search_result_track()

def test_exact_matcher_true(self):
Expand All @@ -69,7 +69,7 @@ def test_exact_matcher_false(self):


class TestInMatcher:
def setup(self):
def setup_method(self):
self.str = get_search_result_track()

def test_in_matcher_none(self):
Expand All @@ -94,7 +94,7 @@ def test_in_matcher_false(self):


class TestGtLtMatchers:
def setup(self):
def setup_method(self):
self.str = get_search_result_track()

def test_gt_bitrate_matcher_true(self):
Expand Down Expand Up @@ -197,7 +197,7 @@ def test_false(self):


class TestTracksMatcher:
def setup(self):
def setup_method(self):
self.str = get_search_result_track()

def test_in_matcher(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/xl/trax/test_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Test_MetadataCacher:
TIMEOUT = 2000
MAX_ENTRIES = 2

def setup(self):
def setup_method(self):
self.mc: track._MetadataCacher[str, str] = track._MetadataCacher(
self.TIMEOUT, self.MAX_ENTRIES
)
Expand Down
4 changes: 2 additions & 2 deletions tests/xl/trax/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_directory(self):


class TestSortTracks:
def setup(self):
def setup_method(self):
self.tracks = [
xl.trax.track.Track(url) for url in ('/tmp/foo', '/tmp/bar', '/tmp/baz')
]
Expand All @@ -62,7 +62,7 @@ def test_reversed(self):


class TestSortResultTracks:
def setup(self):
def setup_method(self):
tracks = [
xl.trax.track.Track(url) for url in ('/tmp/foo', '/tmp/bar', '/tmp/baz')
]
Expand Down

0 comments on commit 74e994e

Please sign in to comment.