Skip to content

Commit

Permalink
Fixed bad test, removed tests of impossible use
Browse files Browse the repository at this point in the history
  • Loading branch information
StokesMIDE committed Dec 10, 2024
1 parent 2e3deb1 commit 8e1f869
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions testing/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,16 +441,11 @@ def testEndSession(self):
def testAddSensor(self):
""" Test that the sensors are being added correctly. """
sensor1 = Sensor(self.dataset, 0)
sensor2 = Sensor(self.dataset, 'q')

# test that numeric ids work
self.dataset.addSensor(0)
self.assertEqual(sensor1, self.dataset.sensors[0])

# test that string ids work
self.dataset.addSensor('q')
self.assertEqual(sensor2, self.dataset.sensors['q'])


def testAddChannel(self):
""" Test that each channel is being added to the dataset correctly, and
Expand Down Expand Up @@ -481,16 +476,12 @@ def testAddTransform(self):
# set up new transforms
xform1 = Transformable()
xform1.id = 1
xform2 = Transformable()
xform2.id = 'q'
xform3 = Transformable()
xform3.id = None

# assert that transforms are being added correctly
self.dataset.addTransform(xform1)
self.dataset.addTransform(xform2)
self.assertEqual(self.dataset.transforms[1], xform1)
self.assertEqual(self.dataset.transforms['q'], xform2)

# assert that transforms without an id will raise errors
self.assertRaises(ValueError, self.dataset.addTransform, xform3)
Expand Down Expand Up @@ -626,7 +617,7 @@ def testInitAndEQ(self):
self.assertEqual(self.sensor1, Sensor(self.dataset, 1))

sensor3 = Sensor(self.dataset, 3, name=None)
self.assertEqual(sensor3.name, "Sensor%02d")
self.assertEqual(sensor3.name, "Sensor03")


def testGetItem(self):
Expand Down

0 comments on commit 8e1f869

Please sign in to comment.