| anybox.testing.datime. Å×½ºÆ® ¸ñÀûÀ¸·Î ³¯Â¥¿Í ½Ã°£°ú °ü·ÃµÈ ´Ù¾çÇÑ À¯Æ¿¸®Æ¼ |
Áö±Ý ´Ù¿î·Îµå |
anybox.testing.datime. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Georges Racinet
anybox.testing.datime. ű×
anybox.testing.datime. ¼³¸í
anybox.testing.dateTime Å×½ºÆ®¿¡¼ ½Ã°£À» º¸³»´Â µ¥ÀÖ¾î ÆÄÀ̽㠸ðµâÀ̸ç, Àбâ readmeµµ doctostÀÔ´Ï´Ù. ÀÌ ÆÐÅ°ÁöÀÇ ´Ù¸¥ DOCTESTS´Â ´ÙÀ½À» ¼öÇàÇÕ´Ï´Ù. NOSETESTS - WITH-DOCTEST --DOCTEST-Extension = TXTBEFORE ANYTHALLEGALTEDETETETIME ¸ðµâÀ» ¼öÁ¤ µÈ °ÍÀ¸·Î ¹Ù²Ù·Á¸é ÆÐÅ°Áö¸¦ °¡Á®¿Í¾ßÇÕ´Ï´Ù. >>> °¡Á® ¿À±â ANYBOX .testing.datetime >>> Datetime °¡Á® ¿À±â Datetime >>> °¡Á® ¿À±â ŸÀÓ ·¿ÀÇ ½ÇÁ¦ °¡Ä¡ À¯Áö : >>> start = datetime.now () >>> start_t = time.time () ´ÙÀ½ : >> >>> DateTime.now () DateTime (2001, 1, 1, 3, 57) >>> DateTime.today () DateTime ( 2001, 1, 1, 3, 57) ½Ã°£ ¸ðµâÀº ´ÙÀ½°ú °°½À´Ï´Ù : >>> DateTime.FromTimestamp (time.time ()) DateTime (2001, 1, 1, 3, 57) - ¸î ¸¶ÀÌÅ©·Î ÃÊÀÇ Â÷À̸¦ ±â´ëÇÒ ¼ö ÀÖ½À´Ï´Ù. (DateTime.FromTimeStamp°¡ ¹«½ÃÇϱ⠶§¹®¿¡ ¿©±â¿¡ Ç¥½ÃµÇÁö ¾Ê¾Æ). ±× ÈÄ¿¡ ÀØÁö ¸¶¼¼¿ä. () ÀÌÁ¦ ÀÏÀ» È®ÀÎÇØ º¾½Ã´Ù : >>> Now = DateTime.now () >>> n ow >>> DateTime °¡Á® ¿À±â Timedelta >>> Áö±Ý ½ÃÀÛ - ½ÃÀÛ ½Ã°£ ¸ðµâ·Î # 10 MSTRueAnd : >>> Now_t = time.time () >>> Now_t> start_ttrue> >> Now_t - start_t <0.01 # 10 ms AgaintRueProductÀÇ È¨ÆäÀÌÁö
anybox.testing.datime. °ü·Ã ¼ÒÇÁÆ®¿þ¾î