Skip to content

Commit

Permalink
solve some flake warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Stein Heselmans authored and Stein Heselmans committed Dec 17, 2024
1 parent e441c34 commit bee7239
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sphinx.cmd.build
import sphinx.cmd.quickstart


class TestSphinx(unittest.TestCase):

@classmethod
Expand All @@ -29,12 +30,17 @@ def setUpClass(cls):
"extensions": ["mlx.traceability"],
}, silent=True)

with open(f'{cls.docs_folder}/conf.py', 'a') as cfg:
cfg.write("traceability_render_relationship_per_item = True\n")
cfg.write("traceability_relationships = {'my_relation': 'my_reverse_relation'}\n")
cfg.write("traceability_relationship_to_string = {'my_relation': 'My relation', 'my_reverse_relation': 'My reverse relation'}\n")
cfg.write("traceability_attributes = {}\n")
cfg.write("traceability_attributes_sort = {}\n")
cfg = r"""
traceability_render_relationship_per_item = True
traceability_relationships = {'my_relation': 'my_reverse_relation'}
traceability_relationship_to_string = {'my_relation': 'My relation',
'my_reverse_relation': 'My reverse relation'}
traceability_attributes = {}
traceability_attributes_sort = {}
"""

with open(f'{cls.docs_folder}/conf.py', 'a') as f:
f.write(textwrap.dedent(cfg))

@classmethod
def tearDownClass(cls):
Expand Down Expand Up @@ -113,4 +119,3 @@ def test_item_relation_hide_both(self):
content = f.read()
assert 'My relation' not in content
assert 'My reverse relation' not in content

0 comments on commit bee7239

Please sign in to comment.