Skip to content

Commit b32d1d5

Browse files
committed
Minor style corrections
1 parent 269d739 commit b32d1d5

16 files changed

+16
-32
lines changed

tests/integration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ async def main():
3535
log.info("Fetching world...")
3636
world = await client.fetch_world(selected.name)
3737

38-
3938
finally:
4039
await client.session.close()
4140

4241
if __name__ == '__main__':
4342
loop = asyncio.get_event_loop()
44-
loop.run_until_complete(main())
43+
loop.run_until_complete(main())

tests/tests_character.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import datetime
22
import unittest
33

4-
import tests.tests_guild
54
from tests.tests_tibiapy import TestCommons
6-
from tibiapy import Character, CharacterHouse, Death, InvalidContent, Killer, AccountBadge
5+
from tibiapy import AccountBadge, Character, CharacterHouse, Death, InvalidContent, Killer
76
from tibiapy.enums import AccountStatus, Sex, Vocation
87
from tibiapy.utils import parse_tibia_datetime
98

tests/tests_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ async def test_client_handle_errors(self, mock):
5454
with self.assertRaises(NetworkError):
5555
await self.client.fetch_recent_news(30)
5656

57-
5857
@aioresponses()
5958
async def test_client_fetch_character(self, mock):
6059
"""Testing fetching a character"""

tests/tests_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ def test_event_schedule_from_content(self):
2222
events_on_day = calendar.get_events_on(datetime.date(2020, 9, 15))
2323
self.assertEqual(2, len(events_on_day))
2424
self.assertEqual(4, events_on_day[0].duration)
25-
26-
2725
# endregion

tests/tests_forums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_forum_thread_from_content(self):
189189
thread = ForumThread.from_content(content)
190190

191191
self.assertEqual("News: Team Finder, Visualisation of Loot Lists", thread.title)
192-
self.assertEqual(4797985,thread.thread_id)
192+
self.assertEqual(4797985, thread.thread_id)
193193
self.assertEqual('Auditorium (English Only)', thread.board)
194194
self.assertEqual('Community Boards', thread.section)
195195
self.assertEqual(4796826, thread.previous_topic_number)
@@ -296,7 +296,7 @@ def test_cm_post_archive_from_content_pages(self):
296296
self.assertEqual(168, cm_post_archive.total_pages)
297297
self.assertEqual(20, len(cm_post_archive.posts))
298298

299-
def test_cm_post_archive_from_content_unrelated_section (self):
299+
def test_cm_post_archive_from_content_unrelated_section(self):
300300
content = self.load_resource(self.FILE_UNRELATED_SECTION)
301301
with self.assertRaises(InvalidContent):
302302
CMPostArchive.from_content(content)

tests/tests_guild.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import datetime
22
import unittest
33

4-
import tests.tests_character
54
from tests.tests_tibiapy import TestCommons
65
from tibiapy import Guild, GuildHouse, GuildInvite, GuildMember, GuildWars, InvalidContent, ListedGuild
76

@@ -203,10 +202,9 @@ def test_guild_init_founded(self):
203202
self.assertIsNone(Guild(founded=None).founded)
204203
self.assertIsNone(Guild(founded="Jul 20").founded)
205204

206-
207205
# region Guild War Tests
208206
def test_guild_wars_from_content_active_history(self):
209-
"Testing parsing the guild wars of a guild currently in war and with war history."
207+
"""Testing parsing the guild wars of a guild currently in war and with war history."""
210208
content = self.load_resource(FILE_GUILD_WAR_ACTIVE_HISTORY)
211209
guild_wars = GuildWars.from_content(content)
212210

@@ -262,5 +260,4 @@ def test_guild_wars_from_content_unactive_history(self):
262260
self.assertEqual(1000, guild_wars.history[0].score_limit)
263261
self.assertTrue(guild_wars.history[0].surrender)
264262

265-
266263
# endregion

tests/tests_highscores.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import unittest
21
import datetime
2+
import unittest
33

4-
import tests.tests_character
54
from tests.tests_tibiapy import TestCommons
65
from tibiapy import Category, ExpHighscoresEntry, Highscores, HighscoresEntry, InvalidContent, LoyaltyHighscoresEntry, \
76
Vocation, VocationFilter

tests/tests_house.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import json
33
import unittest
44

5-
import tests.tests_character
65
from tests.tests_tibiapy import TestCommons
76
from tibiapy import House, InvalidContent, ListedHouse
87
from tibiapy.enums import HouseStatus, HouseType

tests/tests_tournament.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,5 +216,4 @@ def test_tournament_leaderboards_from_content_unrelated(self):
216216
content = self.load_resource(self.FILE_UNRELATED_SECTION)
217217
with self.assertRaises(InvalidContent):
218218
TournamentLeaderboard.from_content(content)
219-
220-
# endregion
219+
# endregion

tests/tests_world.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
import json
33
import unittest
44

5-
import tests.tests_character
65
from tests.tests_tibiapy import TestCommons
7-
from tibiapy import InvalidContent, World, WorldOverview, TournamentWorldType
6+
from tibiapy import InvalidContent, TournamentWorldType, World, WorldOverview
87
from tibiapy.enums import PvpType, TransferType, WorldLocation
98
from tibiapy.world import ListedWorld
109

@@ -135,5 +134,4 @@ def test_world_overview_from_content_unrelated(self):
135134
content = self.load_resource(self.FILE_UNRELATED_SECTION)
136135
with self.assertRaises(InvalidContent):
137136
ListedWorld.list_from_content(content)
138-
139-
# endregion
137+
# endregion

0 commit comments

Comments
 (0)