Skip to content

Comments

Add support for windows#6

Open
leriksen137 wants to merge 3 commits intoSnagnar:mainfrom
leriksen137:feature/support-windows-os
Open

Add support for windows#6
leriksen137 wants to merge 3 commits intoSnagnar:mainfrom
leriksen137:feature/support-windows-os

Conversation

@leriksen137
Copy link

Not all tests run on Windows due to encoding issues. With these changes, the tests succeed on Windows, or are skipped.

@leriksen137
Copy link
Author

Two changes in files are only comments.

Here is an example output when I run test_cli.py on Windows:

============================= test session starts =============================
collecting ... collected 44 items

tests/test_cli.py::TestCompileDslSource::test_simple_signal_compiles
tests/test_cli.py::TestCompileDslSource::test_memory_and_lamp_compiles
tests/test_cli.py::TestCompileDslSource::test_with_custom_program_name
tests/test_cli.py::TestCompileDslSource::test_with_source_name_path
tests/test_cli.py::TestCompileDslSource::test_json_output
tests/test_cli.py::TestCompileDslSource::test_optimize_disabled
tests/test_cli.py::TestCompileDslSource::test_power_poles_option
tests/test_cli.py::TestCompileDslSource::test_syntax_error_fails
tests/test_cli.py::TestCompileDslSource::test_semantic_error_fails
tests/test_cli.py::TestCompileDslSource::test_different_log_levels
tests/test_cli.py::TestValidatePowerPoles::test_valid_small
tests/test_cli.py::TestValidatePowerPoles::test_valid_medium
tests/test_cli.py::TestValidatePowerPoles::test_valid_big
tests/test_cli.py::TestValidatePowerPoles::test_valid_substation
tests/test_cli.py::TestValidatePowerPoles::test_case_insensitive
tests/test_cli.py::TestValidatePowerPoles::test_none_value
tests/test_cli.py::TestValidatePowerPoles::test_invalid_type
tests/test_cli.py::TestSetupLogging::test_valid_log_level
tests/test_cli.py::TestCliMain::test_compile_string_input
tests/test_cli.py::TestCliMain::test_both_file_and_string_fails
tests/test_cli.py::TestCliMain::test_no_input_fails
tests/test_cli.py::TestCliMain::test_output_to_file
tests/test_cli.py::TestCliMain::test_custom_name
tests/test_cli.py::TestCliMain::test_no_optimize_flag
tests/test_cli.py::TestCliMain::test_power_poles_flag
tests/test_cli.py::TestCliMain::test_power_poles_value
tests/test_cli.py::TestCliMain::test_json_output
tests/test_cli.py::TestCliMain::test_log_level_debug
tests/test_cli.py::TestCliMain::test_log_level_info
tests/test_cli.py::TestCliMain::test_syntax_error_file
tests/test_cli.py::TestCliMain::test_layout_retries_option
tests/test_cli.py::TestCliMain::test_output_directory_creation
tests/test_cli.py::TestCliEdgeCases::test_string_with_debug_logging
tests/test_cli.py::TestCliEdgeCases::test_file_with_verbose_shows_messages
tests/test_cli.py::TestCliCoverageGaps::test_compile_with_all_options PASSED [ 2%]PASSED [ 4%]PASSED [ 6%]PASSED [ 9%]PASSED [ 11%]PASSED [ 13%]PASSED [ 15%]PASSED [ 18%]PASSED [ 20%]PASSED [ 22%]PASSED [ 25%]PASSED [ 27%]PASSED [ 29%]PASSED [ 31%]PASSED [ 34%]PASSED [ 36%]PASSED [ 38%]PASSED [ 40%]
tests/test_cli.py::TestSetupLogging::test_invalid_log_level PASSED [ 43%]
tests/test_cli.py::TestCliMain::test_compile_file PASSED [ 45%]PASSED [ 47%]PASSED [ 50%]PASSED [ 52%]PASSED [ 54%]PASSED [ 56%]PASSED [ 59%]PASSED [ 61%]PASSED [ 63%]PASSED [ 65%]PASSED [ 68%]PASSED [ 70%]PASSED [ 72%]PASSED [ 75%]PASSED [ 77%]PASSED [ 79%]PASSED [ 81%]PASSED [ 84%]
tests/test_cli.py::TestCliCoverageGaps::test_compile_with_no_optimize_flag PASSED [ 86%]
tests/test_cli.py::TestCliCoverageGaps::test_compile_source_with_warnings PASSED [ 88%]
tests/test_cli.py::TestCliCoverageGaps::test_compile_power_poles_substation PASSED [ 90%]
tests/test_cli.py::TestCliCoverageGaps::test_compile_complex_program PASSED [ 93%]
tests/test_cli.py::TestCliCoverageGaps::test_read_file_error_unreadable_file SKIPPED [ 95%]
Skipped: chmod permission test not reliable on Windows

tests/test_cli.py::TestCliCoverageGaps::test_read_file_error_nonexistent_file PASSED [ 97%]
tests/test_cli.py::TestCliCoverageGaps::test_write_file_error_unwritable_directory SKIPPED [100%]
Skipped: chmod permission test not reliable on Windows

======================== 42 passed, 2 skipped in 6.37s ========================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant