Skip to content
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

Tests failing (3 to 7, Windows) #1917

Open
chwt opened this issue Sep 22, 2024 · 1 comment
Open

Tests failing (3 to 7, Windows) #1917

chwt opened this issue Sep 22, 2024 · 1 comment
Labels
needs more info Further information is requested support End user support

Comments

@chwt
Copy link

chwt commented Sep 22, 2024

Diagnostic output

jrnl: v4.1
Python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
OS: Windows 10

(note: it is Windows 11)

What are you trying to do?

Running both

  • poe test
  • pytest

on current develop branch return failed tests.
Running from both PowerShell 7.4.5 and WSL

poe summary:

========================================================================================================================= short test summary info ==========================================================================================================================
FAILED tests/bdd/test_features.py::test_printing_a_journal_that_has_multiline_entries_with_tags[basic_folder.yaml] - AssertionError: assert '2020-08-29 1...os himenaeos.' == '2020-08-29 1...os himenaeos.'
FAILED tests/bdd/test_features.py::test_printing_a_journal_that_has_multiline_entries_with_tags[basic_dayone.yaml] - AssertionError: assert '2020-08-29 1...os himenaeos.' == '2020-08-29 1...os himenaeos.'
FAILED tests/bdd/test_features.py::test_combining_changetime_and_delete_and_edit_affects_appropriate_entries[basic_folder.yaml] - AssertionError:
FAILED tests/bdd/test_features.py::test_printing_a_journal_that_has_multiline_entries_with_tags[basic_onefile.yaml] - AssertionError: assert '2020-08-29 1...os himenaeos.' == '2020-08-29 1...os himenaeos.'
FAILED tests/bdd/test_features.py::test_printing_a_journal_that_has_multiline_entries_with_tags[basic_encrypted.yaml] - AssertionError: assert '2020-08-29 1...os himenaeos.' == '2020-08-29 1...os himenaeos.'
FAILED tests/bdd/test_features.py::test_writing_into_dayone - AssertionError: assert '1979-05-01 0...g born hurts.' == '1979-05-01 0...g born hurts.'
FAILED tests/bdd/test_features.py::test_count_modifications_when_editing_whole_journal_and_adding_to_last_entry[basic_folder.yaml] - AssertionError:
================================================================================================================ 7 failed, 634 passed, 44 skipped in 18.36s ================================================================================================================

test-failure-poe.txt

pytest summary:

=========================================================================================== short test summary info ============================================================================================
FAILED tests/bdd/test_features.py::test_combining_changetime_and_delete_and_edit_affects_appropriate_entries[basic_folder.yaml] - AssertionError:
FAILED tests/bdd/test_features.py::test_writing_into_dayone - AssertionError: assert '1979-05-01 0...g born hurts.' == '1979-05-01 0...g born hurts.'
FAILED tests/bdd/test_features.py::test_count_modifications_when_editing_whole_journal_and_adding_to_last_entry[basic_folder.yaml] - AssertionError:
================================================================================== 3 failed, 638 passed, 44 skipped in 19.61s ==================================================================================

test-failure-pytest.txt

What have you tried?

n/a

Other Information

No response

@chwt chwt added 🆕 New! support End user support labels Sep 22, 2024
@chwt chwt changed the title Tests failing (3 to 5, Windows) Tests failing (3 to 7, Windows) Sep 22, 2024
@micahellison
Copy link
Member

Hi @chwt, sorry for the slow response. I have various issues with tests failing on Windows also, though my error messages are different, and it's only when running poe test. Weirdly, the Windows Server machines that run our tests on GitHub seem to be fine, so I always thought it was just something odd about my environment.

Running poe test on Windows uses tox, which I think is the main problem with these errors. tox has features related to colors and screen sizes that I think work better in Linux than Windows, and jrnl has behaviors that vary based on these things, which is why I believe it's an issue. Because of these problems, I bypass this process in my local Windows environment. I would think that your WSL environment would still work, though, if you're running all your commands in Linux.

Do you use poetry to run pytest? I wonder if that's the cause of the errors you're getting when running pytest by itself, since it might be missing dependencies if not. Still, I'd expect different test failures if that was the case.

Also, I wonder if these tests are locale-specific. When I run Get-WinSystemLocale in PowerShell my locale name is en-US. Maybe if yours is different, that could explain some of these errors.

You might have better luck with a more recent version of Python. While jrnl technically supports Python 3.10 now, we will be dropping support for it soon within the next year.

@micahellison micahellison added needs more info Further information is requested and removed 🆕 New! labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info Further information is requested support End user support
Projects
None yet
Development

No branches or pull requests

2 participants