Skip to content

Commit

Permalink
Fix enable test
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobachetti committed Mar 19, 2024
1 parent 2c5061a commit ec069b0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions basie/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import unittest
import copy
from io import StringIO

import numpy as np
from basie.backend import *
from basie.radiotelescopes import *

Expand All @@ -30,19 +30,18 @@ def test_roach_backend_bck_file(self):

class TestTotalPowerBackend(unittest.TestCase):
def setUp(self):
self.backend = TotalPowerBackend("TP", 10, 10, 300)
self.backend = TotalPowerBackend("TP", 10, 10, 300, feeds="1,2")

def test_total_power_set_sections(self):
n_sections = 2
self.backend.set_sections(n_sections)
self.assertEqual(len(self.backend.sections), n_sections)
@pytest.mark.xfail

def test_total_power_set_sections_enable(self):
self.backend.set_sections(2)
instructions = StringIO(str(self.backend._get_backend_instructions()))
lines = instructions.readlines()
enable_line = lines[-1].strip()
self.assertTrue(enable_line.startswith("enable"))
self.assertTrue(np.any(["enable=1,2" in line for line in lines]))

def test_set_addition(self):
# https://github.com/discos/basie/issues/28
Expand Down

0 comments on commit ec069b0

Please sign in to comment.