-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nonav option to skip navigation bar in multipage HTML #78
base: master
Are you sure you want to change the base?
Conversation
I'm still trying to understand how to add a test for this. |
Ah, nice idea. Thank you for the pull request. Maybe these tests can help you create a test for it? https://github.com/tomtom-international/asciidoxy/blob/master/tests/unit/generator/test_generator.py#L1362 I noticed I could not find an explicit test that checks. But the test mentioned above implicitly includes a check for the exact contents of the generated adoc file including the nav bar. For writing those tests (and updating expected results) it is also good to know about this option: https://github.com/tomtom-international/asciidoxy/blob/master/tests/unit/conftest.py#L38 |
I'm not very firm in Python yet and need some more time to understand the tests. I'll update this PR once I've got something if that's ok. |
I looked at this again but I can't crack the tests. I'm trying to understand how they are written and wanted to focus on the multipage test and try modifying it. I checked out the latest version of What am I missing here? Shouldn't these just pass when I clone the repo or do I need to do more?
```
(venv) C:\Users\mnapp\mydata\software\git\asciidoxy [nonav-option ≡]> pytest -k test_process_adoc_multi_file
====================================================== test session starts =======================================================
platform win32 -- Python 3.10.7, pytest-7.4.0, pluggy-1.3.0
rootdir: C:\Users\mnapp\mydata\software\git\asciidoxy
configfile: pyproject.toml
collected 6557 items / 6547 deselected / 10 selected
tests\unit\generator\test_generator.py EEEEEEEEEE [100%] ============================================================= ERRORS ============================================================= self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[multi-page-1.8.17]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[multi-page-1.8.18]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[multi-page-1.8.20]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[multi-page-1.9.1]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[multi-page-1.9.2]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[single-page-1.8.17]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[single-page-1.8.18]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[single-page-1.8.20]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[single-page-1.9.1]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError self = <_pytest.config.Config object at 0x000002C1E7A58880>, name = 'update_expected_results', default = , skip = False
E AttributeError: 'Namespace' object has no attribute 'update_expected_results' c:\BuildTools\python\3.10.7\lib\site-packages_pytest\config_init_.py:1611: AttributeError The above exception was the direct cause of the following exception: request = <SubRequest 'update_expected_results' for <Function test_process_adoc_multi_file[single-page-1.9.2]>>
E ValueError: no option named 'update_expected_results' tests\unit\conftest.py:45: ValueError
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
I will take a look at the tests and the contributor documentation. I was actually planning to pick this up and try and create another 0.8.x release with it, but I forgot. |
I need to generate standalone HTML files for my use case. The multipage option will generate separate files but includes the navigation bar to tie into the larger document. Add an option to omit this navigation bar.