mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 05:17:59 +01:00
Compare enumeration instances by identity
See https://docs.python.org/3.7/library/enum.html#comparisons
This commit is contained in:
parent
581d7db907
commit
5160a9edae
2 changed files with 5 additions and 5 deletions
|
@ -5,7 +5,7 @@ Mapper tests.
|
||||||
|
|
||||||
#
|
#
|
||||||
# Fimfarchive, preserves stories from Fimfiction.
|
# Fimfarchive, preserves stories from Fimfiction.
|
||||||
# Copyright (C) 2018 Joakim Soderlund
|
# Copyright (C) 2019 Joakim Soderlund
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -440,14 +440,14 @@ class TestMetaFormatMapper:
|
||||||
Tests alpha meta format is detected.
|
Tests alpha meta format is detected.
|
||||||
"""
|
"""
|
||||||
story = self.merge(story, alpha, 'misc')
|
story = self.merge(story, alpha, 'misc')
|
||||||
assert mapper(story) == MetaFormat.ALPHA
|
assert mapper(story) is MetaFormat.ALPHA
|
||||||
|
|
||||||
def test_beta_format(self, mapper, story, beta):
|
def test_beta_format(self, mapper, story, beta):
|
||||||
"""
|
"""
|
||||||
Tests beta meta format is detected.
|
Tests beta meta format is detected.
|
||||||
"""
|
"""
|
||||||
story = self.merge(story, beta, 'misc')
|
story = self.merge(story, beta, 'misc')
|
||||||
assert mapper(story) == MetaFormat.BETA
|
assert mapper(story) is MetaFormat.BETA
|
||||||
|
|
||||||
def test_conflict(self, mapper, story, alpha, beta):
|
def test_conflict(self, mapper, story, alpha, beta):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -5,7 +5,7 @@ Utility tests.
|
||||||
|
|
||||||
#
|
#
|
||||||
# Fimfarchive, preserves stories from Fimfiction.
|
# Fimfarchive, preserves stories from Fimfiction.
|
||||||
# Copyright (C) 2015 Joakim Soderlund
|
# Copyright (C) 2019 Joakim Soderlund
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -283,7 +283,7 @@ class TestFindFlavor:
|
||||||
Tests flavor is returned when present.
|
Tests flavor is returned when present.
|
||||||
"""
|
"""
|
||||||
found = find_flavor(story, MetaFormat)
|
found = find_flavor(story, MetaFormat)
|
||||||
assert found == MetaFormat.BETA
|
assert found is MetaFormat.BETA
|
||||||
|
|
||||||
def test_missing_flavor(self, story):
|
def test_missing_flavor(self, story):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue