codeplain 0.3.13.dev28__py3-none-any.whl → 0.3.13.dev29__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: codeplain
3
- Version: 0.3.13.dev28
3
+ Version: 0.3.13.dev29
4
4
  Summary: Transform plain language specifications into working code
5
5
  License-File: LICENSE
6
6
  Classifier: Environment :: Console
@@ -8,7 +8,7 @@ Classifier: Intended Audience :: Developers
8
8
  Classifier: Operating System :: OS Independent
9
9
  Classifier: Topic :: Software Development :: Code Generators
10
10
  Requires-Python: ==3.11.*
11
- Requires-Dist: gitpython==3.1.59
11
+ Requires-Dist: gitpython==3.1.62
12
12
  Requires-Dist: mistletoe==1.6.0
13
13
  Requires-Dist: networkx==3.6.1
14
14
  Requires-Dist: python-frontmatter==1.3.0
@@ -60,7 +60,7 @@ render_machine/actions/fix_unit_tests.py,sha256=NgfoqCI4XANrA9muAT9bygEEuvqnwTTZ
60
60
  render_machine/actions/prepare_repositories.py,sha256=HyZ1R6E3H5V-G4WDSGfhxl_arskmW9FcaxNdQr6JjVs,3867
61
61
  render_machine/actions/prepare_testing_environment.py,sha256=kIsXgV6-jOlqp-04cimPgTQoHPrVIu0zW-H_Jj-jowE,2106
62
62
  render_machine/actions/refactor_code.py,sha256=gyPsnqgHseL2bkENu4WeGCRyV0R18_GH3JOrPdoxKvg,2609
63
- render_machine/actions/render_conformance_tests.py,sha256=oHGgpbseZpLiFkEoUP0evZ6jdQfkM5OyhEnpkJerbk0,9469
63
+ render_machine/actions/render_conformance_tests.py,sha256=5gOQn-G1T9UWEI8sDfALcVdArk0ln9DgUprOPjccS-U,9268
64
64
  render_machine/actions/render_functional_requirement.py,sha256=53KzMVlcefoag1x73roCEQvQ7FbmH8FzhXMQau-s8tg,4655
65
65
  render_machine/actions/run_conformance_tests.py,sha256=yUG6buqp75EOmJYxdM6MmCNF5_G4TUxA-QSTKx7EzxA,3760
66
66
  render_machine/actions/run_unit_tests.py,sha256=j0qsHMLy49I_DX5QLlH0OdPT6bPMc0icmVg2N5MYm9U,2711
@@ -76,7 +76,6 @@ tests/test_arg_provenance.py,sha256=d_J7aCeHMXBpctBWTt60WU-I8pEKN7XRXRTJZZGCdo0,
76
76
  tests/test_change_detection.py,sha256=jH8SEhndX400DNqIKmcYLzxHqq9WFdgmuvY3XPq-ZFc,13534
77
77
  tests/test_cli_output.py,sha256=9yTk0pD2w6vkiSdSkYwneUmEtNqX4x64F6PzYShUEcw,19331
78
78
  tests/test_conformance_fix_journal.py,sha256=olTeAuxXgFwQ8LSQyt0FqtBy9_XY_gK-Ei_pUuJ0C3M,10389
79
- tests/test_conformance_test_regeneration_credit_key.py,sha256=3LFLo2kRA1qDpU_Uojb6yUgZeRAwJWURHj1ImU_0ITE,3174
80
79
  tests/test_console_log_styles.py,sha256=sxlhynMAP-kmqhBn1-pKvZXdCnlKSyCGJqwYKrh6sQ0,6468
81
80
  tests/test_distill_conformance_test_memory.py,sha256=Tftw9l-gLVwIU6QttY03h2VedvuFxpIsCmZIzvWfxMA,5481
82
81
  tests/test_dry_run_link_validation.py,sha256=ivvYXQPqUkQ8glbFyUrdCninCxF2mg-rAsDcfjcB7MM,2140
@@ -122,8 +121,8 @@ tui/spinner.py,sha256=Ro6Gd9Przf-whuHqPRY6HwI0T57yJjyNPbhDbigZKZE,2471
122
121
  tui/state_handlers.py,sha256=zbUS_D9eU8qIwVpaxPEp9zL9bpg8gXsWNoUaqg9TLrQ,16664
123
122
  tui/styles.css,sha256=kiC7Og_2G1E7owoiZgV95-3_dSeQnsNj3qzaY04xkDg,6727
124
123
  tui/widget_helpers.py,sha256=jitm2WHiKj-NVFL-hULxWzckPreRbUTl9OIZLN31-ek,6997
125
- codeplain-0.3.13.dev28.dist-info/METADATA,sha256=pKLO6LPM9yQO2hSm-AJFxZoThm0RI8aj-3T9YMYVs60,7257
126
- codeplain-0.3.13.dev28.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
127
- codeplain-0.3.13.dev28.dist-info/entry_points.txt,sha256=oDZkBqu9WhtZApb_K6ia8-fn9aojwmAsgnKELceX5T4,46
128
- codeplain-0.3.13.dev28.dist-info/licenses/LICENSE,sha256=pCeKgQ1mXE5OmNUuKOfOZh1T1vqkeCUxghE7N8qgnzc,11345
129
- codeplain-0.3.13.dev28.dist-info/RECORD,,
124
+ codeplain-0.3.13.dev29.dist-info/METADATA,sha256=7e47DAmzzyikDqa5fXVOpGYjOHDLKKuov-v3FXGYO0M,7257
125
+ codeplain-0.3.13.dev29.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
126
+ codeplain-0.3.13.dev29.dist-info/entry_points.txt,sha256=oDZkBqu9WhtZApb_K6ia8-fn9aojwmAsgnKELceX5T4,46
127
+ codeplain-0.3.13.dev29.dist-info/licenses/LICENSE,sha256=pCeKgQ1mXE5OmNUuKOfOZh1T1vqkeCUxghE7N8qgnzc,11345
128
+ codeplain-0.3.13.dev29.dist-info/RECORD,,
@@ -52,12 +52,9 @@ class RenderConformanceTests(BaseAction):
52
52
  ],
53
53
  style=console.INFO_STYLE,
54
54
  )
55
- # frid and module_name identify the functionality being rendered, which is what the API
56
- # reserved credits for. The functionality under test is carried by functional_requirement
57
- # and existing_folder_names, and may be an earlier one during regression.
58
55
  fr_subfolder_name = render_context.codeplain_api.generate_folder_name_from_functional_requirement(
59
- frid=render_context.frid_context.frid,
60
- module_name=render_context.module_name,
56
+ frid=render_context.conformance_tests_running_context.current_testing_frid,
57
+ module_name=render_context.conformance_tests_running_context.current_testing_module_name,
61
58
  functional_requirement=render_context.conformance_tests_running_context.current_testing_frid_specifications[
62
59
  plain_spec.FUNCTIONAL_REQUIREMENTS
63
60
  ][
@@ -1,87 +0,0 @@
1
- """Tests for the identifiers sent when conformance tests of an earlier functionality are recreated.
2
-
3
- The API reserves credits for the functionality being rendered and keys the reservation on the frid
4
- and module name the client sends. During regression the functionality under test can be an earlier
5
- one, so the call must still name the functionality being rendered or the API refuses it with a 404.
6
- """
7
-
8
- from types import SimpleNamespace
9
-
10
- import pytest
11
-
12
- import plain_spec
13
- from render_machine.actions.render_conformance_tests import RenderConformanceTests
14
- from render_machine.render_types import ConformanceTestsRunningContext
15
-
16
- RENDERED_FRID = "3"
17
- TESTED_FRID = "2"
18
- MODULE_NAME = "task-manager"
19
-
20
-
21
- class StopAfterFolderNameCall(Exception):
22
- """Ends the action once the call under test has been captured."""
23
-
24
-
25
- class FakeCodeplainAPI:
26
- def __init__(self):
27
- self.folder_name_call = None
28
-
29
- def generate_folder_name_from_functional_requirement(self, **kwargs):
30
- self.folder_name_call = kwargs
31
- raise StopAfterFolderNameCall
32
-
33
-
34
- class FakeConformanceTests:
35
- def fetch_existing_conformance_test_folder_names(self, module_name):
36
- return []
37
-
38
-
39
- @pytest.fixture
40
- def api():
41
- return FakeCodeplainAPI()
42
-
43
-
44
- @pytest.fixture
45
- def render_context(api):
46
- conformance_tests_running_context = ConformanceTestsRunningContext(
47
- current_testing_module_name=MODULE_NAME,
48
- current_testing_frid=TESTED_FRID,
49
- fix_attempts=0,
50
- conformance_tests_json={RENDERED_FRID: {"folder_name": "add_new_task_ui_verification"}},
51
- conformance_tests_render_attempts=1,
52
- current_testing_frid_specifications={
53
- plain_spec.TEST_REQUIREMENTS: ["- :ConformanceTests: are implemented with Unittest."],
54
- plain_spec.FUNCTIONAL_REQUIREMENTS: ["- The :TaskList: is displayed."],
55
- },
56
- should_prepare_testing_environment=False,
57
- frid_being_implemented=RENDERED_FRID,
58
- )
59
- return SimpleNamespace(
60
- codeplain_api=api,
61
- conformance_tests=FakeConformanceTests(),
62
- conformance_tests_running_context=conformance_tests_running_context,
63
- frid_context=SimpleNamespace(frid=RENDERED_FRID),
64
- module_name=MODULE_NAME,
65
- run_state=SimpleNamespace(render_id="eb93e01c-ac87-4566-b8e3-e4cdab63609c"),
66
- )
67
-
68
-
69
- def capture_folder_name_call(render_context, api):
70
- with pytest.raises(StopAfterFolderNameCall):
71
- RenderConformanceTests()._render_conformance_tests(render_context)
72
- return api.folder_name_call
73
-
74
-
75
- def test_folder_name_call_names_the_rendered_functionality(render_context, api):
76
- """The credit reservation is keyed on the rendered frid and module, so the call must send those."""
77
- call = capture_folder_name_call(render_context, api)
78
-
79
- assert call["frid"] == RENDERED_FRID
80
- assert call["module_name"] == MODULE_NAME
81
-
82
-
83
- def test_folder_name_call_describes_the_functionality_under_test(render_context, api):
84
- """The folder is named after the functionality whose tests are recreated, not the rendered one."""
85
- call = capture_folder_name_call(render_context, api)
86
-
87
- assert call["functional_requirement"] == "- The :TaskList: is displayed."