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

test_observatory.py:test_status fails sometimes #230

Closed
jamessynge opened this issue Dec 21, 2017 · 4 comments
Closed

test_observatory.py:test_status fails sometimes #230

jamessynge opened this issue Dec 21, 2017 · 4 comments
Assignees

Comments

@jamessynge
Copy link
Contributor

I've seen this failure several times recently.

____________________________________________ test_status ____________________________________________

observatory = <pocs.observatory.Observatory object at 0x7f1c539ed208>

    def test_status(observatory):
        os.environ['POCSTIME'] = '2016-08-13 10:00:00'
        status = observatory.status()
        assert 'mount' not in status
        assert 'observation' not in status
>       assert 'observer' in status
E       AssertionError: assert 'observer' in {}

pocs/tests/test_observatory.py:112: AssertionError
@jamessynge jamessynge changed the title test_observatory.py:test_status test_observatory.py:test_status fails sometimes Dec 21, 2017
@wtgee
Copy link
Member

wtgee commented Dec 21, 2017

Odd, I've never seen that one. I'm assuming you haven't been able to identify when you see that.

@wtgee
Copy link
Member

wtgee commented Dec 21, 2017

I see this in the failing tests for #231: Travis report here

The travis logs show a warning a little further down:

logger.py                   37 INFO     	 Observatory initialized
----------------------------- Captured stderr call -----------------------------
2017-12-21 22:36:14 travis-job-9c760981-d745-4f56-afa3-0db3b100ce07 panoptes[22523] WARNING Can't get observatory status: 'str' object is not callable
logger.py                   40 WARNING  Can't get observatory status: 'str' object is not callable
------------------------------ Captured log call -------------------------------
logger.py                   40 WARNING  Can't get observatory status: 'str' object is not callable

Perhaps related to #240 I just opened?

@jamessynge
Copy link
Contributor Author

Not related to #240... I think. Instead, I've narrowed it down to two issues.

  1. The tests aren't hermetic; in particular, the presence of a dome when running test_status depends upon which tests were run previously. Clearly this isn't the fault of test_status, but rather whether test_dome_simulator.py or test_astrohaven_dome.py was run previously. But, this means the config isolation is failing.
  2. When the generic dome simulator is used, the simulator.py:Dome.status property throws a TypeError exception that I don't understand the source of. It says that a str object isn't callable, but I don't understand where it is trying to call a str.

@jamessynge jamessynge self-assigned this Dec 23, 2017
jamessynge added a commit to jamessynge/POCS that referenced this issue Dec 23, 2017
…ng called,

causing an exception because a str can't be called.
@jamessynge
Copy link
Contributor Author

Filed #246 for non-hermetic issue. Fixed second issue, exception due to Dome.status.

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

No branches or pull requests

2 participants