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

Spurious failure in test_with_attrfile #3

Closed
e10harvey opened this issue Mar 5, 2024 · 4 comments · Fixed by #194
Closed

Spurious failure in test_with_attrfile #3

e10harvey opened this issue Mar 5, 2024 · 4 comments · Fixed by #194
Assignees
Labels
bug Something isn't working

Comments

@e10harvey
Copy link
Collaborator

This test fails intermittently with:

 pytest -k test_with_attrfile
=================================================================================== test session starts ====================================================================================
platform linux -- Python 3.11.5, pytest-8.0.0, pluggy-1.4.0
rootdir: /code/opencsp
plugins: xvfb-3.0.0
collected 340 items / 339 deselected / 1 selected                                                                                                                                          

common/lib/render/test/test_ImageAttributeParser.py F                                                                                                                                [100%]

========================================================================================= FAILURES =========================================================================================
_______________________________________________________________________ test_ImageAttributeParser.test_with_attrfile _______________________________________________________________________

self = <test_ImageAttributeParser.test_ImageAttributeParser testMethod=test_with_attrfile>

    def test_with_attrfile(self):
        """ Load all values from the associated attributes file. Use the new current_image_source value. """
        parser = iap.ImageAttributeParser(current_image_source=self.img_file)
    
        # Not 'a' as is in the attributes file associated with self.img_file,
        # but rather the current image source path self.img_file since it is
        # non-None in the constructor.
        self.assertEqual(self.img_file, parser.current_image_source)
        # The rest of these values should be set by the attributes file, since
        # they are not given in the ImageAttributeParser constructor.
>       self.assertEqual(datetime.datetime.fromisoformat('2024-02-17'), parser.date_collected)
E       AssertionError: datetime.datetime(2024, 2, 17, 0, 0) != None

common/lib/render/test/test_ImageAttributeParser.py:55: AssertionError
================================================================================= short test summary info ==================================================================================
FAILED common/lib/render/test/test_ImageAttributeParser.py::test_ImageAttributeParser::test_with_attrfile - AssertionError: datetime.datetime(2024, 2, 17, 0, 0) != None
@e10harvey e10harvey added the bug Something isn't working label Mar 5, 2024
@e10harvey
Copy link
Collaborator Author

Pending close via #40.

@bbean23
Copy link
Collaborator

bbean23 commented Mar 21, 2024

Failed ~57/100 times with for i in {0..100}; do python -m pytest --ignore-glob=*integration* --ignore-glob=*opencsp/app* --ignore-glob=*opencsp/common/lib/test* --ignore-glob=**/test_camera_calibration.py --ignore-glob=**/test_image_processing.py --ignore-glob=**/test_VideoHandler.py --ignore-glob=**/sofast/*/test_System.py; done

From the terminal log:
MobaXterm_20240321_121800.txt

@e10harvey
Copy link
Collaborator Author

e10harvey commented Apr 25, 2024

Pending close via #40.

Update: This bug is still present in the production code, but the test_with_attrfile test is currently skipped.

@e10harvey
Copy link
Collaborator Author

Addressed via #194.

Closing as complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants