예제 #1
0
파일: fs.py 프로젝트: the7day/jabbapylib
def get_timestamped_filename():
    """Return a timestamped text filename."""
    return '{ts}.txt'.format(ts=get_timestamp_from_year_to_second())
예제 #2
0
 def test_get_timestamp_from_year_to_second_04(self):
     res = dat.get_timestamp_from_year_to_second(separator=True, date=self.dt)
     assert res == '2005_03_18_025831'
예제 #3
0
def get_timestamped_filename():
    """Return a timestamped text filename."""
    return "{ts}.txt".format(ts=get_timestamp_from_year_to_second())
예제 #4
0
 def test_get_timestamp_from_year_to_second_02(self): 
     res = dat.get_timestamp_from_year_to_second(separator=True)
     assert re.search('^\d{4}_\d\d_\d\d_\d{6}$', res)
예제 #5
0
 def test_get_timestamp_from_year_to_second_03(self): 
     res = dat.get_timestamp_from_year_to_second(date=self.dt)
     assert res == '20050318_025831'
예제 #6
0
 def test_get_timestamp_from_year_to_second_01(self): 
     res = dat.get_timestamp_from_year_to_second()
     assert re.search('^\d{8}_\d{6}$', res)
예제 #7
0
 def test_get_timestamp_from_year_to_second_04(self):
     res = dat.get_timestamp_from_year_to_second(separator=True,
                                                 date=self.dt)
     assert res == '2005_03_18_025831'
예제 #8
0
 def test_get_timestamp_from_year_to_second_03(self):
     res = dat.get_timestamp_from_year_to_second(date=self.dt)
     assert res == '20050318_025831'
예제 #9
0
 def test_get_timestamp_from_year_to_second_02(self):
     res = dat.get_timestamp_from_year_to_second(separator=True)
     assert re.search('^\d{4}_\d\d_\d\d_\d{6}$', res)
예제 #10
0
 def test_get_timestamp_from_year_to_second_01(self):
     res = dat.get_timestamp_from_year_to_second()
     assert re.search('^\d{8}_\d{6}$', res)