Comments (3)
@karthikgvss will take a look at this issuel
from seattlelib_v2.
I see that tcp_time will set a mapping by calling time_register_method
time_interface.r2py will use the update method of this implementor as per the mapping. So, i think we need not change anything in ut_seattlelib_tcptime.py
similarly, for ut_seattlelib_ntptime.py, time_interface.r2py has to be called instead of time.r2py as we are testing only ntp here. Also, port has to be determined by calling list(getresources()[0]["connport"])[0] instead of hard coding 12345. Please suggest.
from seattlelib_v2.
I find the interaction between these modules a little surprising. It is not immediately obvious that importing tcp_time.r2py
causes the behavior of time_interface.r2py
to change. So these time modules are essentially performing actions on import? If this is what we really want, maybe state this side effect more clearly in the header block. Registering "tcp" time in tcp_time.r2py
by calling time_interface.time_register_method() at the end of the module (i.e., the action on import) might also be a readability problem:
https://github.com/SeattleTestbed/seattlelib_v2/blob/master/tcp_time.r2py#L123-L124
Note: But I do understand that it's done this way because the tcp_time_updatetime()
function needs to be defined..
What happens if we import both tcp_time.r2py
and ntp_time.r2py
? What if another module imports them separately, for example if these unit tests are executed in a testing framework? Or there is a circular import? I'm assuming time_interface.r2py
would choose one of the available time functions and these unit tests would pass if at least one of the registered methods is successful. In other words, is it possible for this unit test to pass if ntp_time.r2py
is registered beforehand and the registered tcp time module is not called at all?
from seattlelib_v2.
Related Issues (20)
- [Unit Testing]: Possible Missing Test Condition in `ut_seattlelib_time_interface_updatetime_before_registermethod.r2py` HOT 3
- `repypp.py` should have unit tests HOT 3
- exception when creating geoip location string... HOT 1
- Dylink doesn't allow us to call functions that start with '_' HOT 2
- dnscommon.r2py cannot parse replies containing NS, PTR types of queries HOT 1
- dnscommon.r2py cannot parse replies containing MX type of queries and it doesn't support 'AAAA' records HOT 1
- Fix `httpretrieve`'s use of "Host" header field
- misuse of callargs in argparse.r2py
- Encasementlib treats all args as security layers HOT 3
- wrapper.r2py needs better error messages for function's argument type checking HOT 3
- Refactor library function names? HOT 1
- Port `strace.py` to RepyV2
- Add trigonometric functions to `math.r2py` HOT 1
- Repeating `centralizedadvertise.r2py` and `centralizedadvertise_v2.r2py`. Problem with `advertiseserver_v2.poly.edu` HOT 2
- `dylink` should use introspection instead of hardcoded RepyV2 API call names HOT 1
- Delete obsolete seattlelib_v2.wiki HOT 1
- Separate `dylink` and `encasementlib` cleanly
- Remove `repyportability` from pure-Repy tests
- Bug in wrapper.r2py where argument validity check for 'bool' type fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seattlelib_v2.