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 for server.py functions #45

Open
12 of 15 tasks
ejgl opened this issue Aug 12, 2021 · 1 comment
Open
12 of 15 tasks

Tests for server.py functions #45

ejgl opened this issue Aug 12, 2021 · 1 comment

Comments

@ejgl
Copy link
Contributor

ejgl commented Aug 12, 2021

Create unit tests for server.py's classes in test_server.py:

An example is:

import unittest
from evora.server.server import Evora, EvoraParser

class TestEvoraParser(unittest.TestCase):
    def setUp(self):
        self.evora = Evora()
        self.parser = EvoraParser(self.evora)
  
    def test_parse_temp(self):
        self.assertTrue(self.parser.parse('temp').isnumeric())

if __name__ == '__main__':
  unittest.main()

Expected outputs can be found in Andor SDK documentation

EvoraParser functions:

  • connect
  • temp
  • tempRange
  • setTEC
  • getTEC
  • warmup
  • shutdown
  • status
  • timings
  • vertStats
  • horzStats
  • abort
  • expose
  • real
  • series
@mattketk
Copy link

mattketk commented Aug 13, 2021

Added some tests in commit 20dd468 ab874f6.

setTEC in EvoraParser is technically functional, but not sure if more test cases should be added.

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