[root]/module/swig/python/unittest

| Author | Changes | Lines of Code | Lines per Change |
|---|---|---|---|
| peterk | 28 (100.0%) | 1146 (100.0%) | 40.9 |
Removed extra print.
5 lines of code changed in 1 file:
Corrected the checking of sensor attributes. They should have an '_'
instead of '.'.
14 lines of code changed in 1 file:
Lots of changes.
Makefile.am
- Removed the --root=$(DESTDIR) parameter. When DESTDIR is blank,
this causes Python's distutils to install the module under the
current directory, not the Python site-packages directory.
setup.py.in
- Added runtime_library_dirs = [ '@prefix@/lib' ] so that the owfs
shared library (libow.so) would have a better chance of being
found at runtime.
ow/__init__.py
- Added the ability to log the calls to _OW.get and _OW.put.
- The Sensor class now knows about cached (/) vs uncached
(/uncached) entries. Any Sensor can switch between them using the
useCache method.
- The string representation of a Sensor now indicates if the cached
or uncached paths are currently being used.
- __repr__ has been added to allow for easier determination of
Sensor id from commands like:
>>> print ow.Sensor( '/' ).sensorList( )
[Sensor("/10.B7B64D000800"), Sensor("/81.A44C23000000"),
Sensor("/1F.440701000000"), Sensor("/1F.5D0B01000000"),
Sensor("/1F.7F0901000000")]
- __eq__ has been added to allow for comparison of Sensor
instances. Two Sensors are considered equal if their _path
attributes are equal. This means that cached and uncached Sensor
instances are considered equal.
>>> ow.Sensor( '/' ) == ow.Sensor( '/uncached' )
True
- useCache method has been added to switch between cached and
uncached Sensor views.
- entryList method has been added to return a list of the Sensor's
entries.
- sensor method has been reworked to better handle root and
microlans. (Thanks to Wim Heirman for pointing out problems and
providing a solution.)
- sensorList methof has been added to return a list of the Sensor's
Sensors.
unittest/Readme.txt
- Added note as to the status of the unittests. Specifically that
two test are currently known to fail.
unittest/ds1420.py, unittest/ds2408.py, unittest/ds2409.py
- Added the ability to run a specific test by specifying it on the
command line.
- Example:
./ds2409.py DS2409.testAttributes
unittest/owload.py
- New unittest for basic reality check - can the ow module be
imported.
unittest/owsensors.py
- New tests - testCacheSwitch, testRootCache, testEntryList,
testSensorList, testEqual.
unittest/owtest_sample.ini, unittest/owtest_think.ini
- Added a type entry to the Root section.
202 lines of code changed in 8 files:
expanded on the unittests.
175 lines of code changed in 4 files:
added parent and branch entries
24 lines of code changed in 2 files:
fuse is not needed for the python module
6 lines of code changed in 2 files:
owtest.ini should be created by anyone who needs to run the unittests. Since each environment is different, it isn't possible to create a general configuration file.
0 lines of code changed in 1 file:
Added latest code for the python bindings. This include the ow module, examples and unittests. Also added a version() function to ow.i to allow the various language bindings to easily determine the version of the OW libraries which are being used.
720 lines of code changed in 9 files: