Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit16a6b15

Browse files
author
d.kovalenko
committed
test_E02__external_modification is corrected
1 parent0404715 commit16a6b15

File tree

1 file changed

+9
-9
lines changed
  • tests/implementation/v00/configuration_std/Objects/PostgresConfigurationWriter_Base/DoWork

1 file changed

+9
-9
lines changed

‎tests/implementation/v00/configuration_std/Objects/PostgresConfigurationWriter_Base/DoWork/test_set001__work.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -372,18 +372,18 @@ def test_E02__external_modification(self, request: pytest.FixtureRequest):
372372
assertfileContent_n=="port = 123\nlisten_addresses = '*'\n"
373373

374374
mdate1=file.m_FileData.m_LastModifiedTimestamp
375+
asserttype(mdate1)==datetime.datetime
375376
logging.info("Last1 modification date is [{0}]".format(mdate1))
376377

377-
time.sleep(0.001)
378+
mdate2=mdate1+datetime.timedelta(seconds=1)
379+
assertmdate2!=mdate1
380+
mdate2_ts=mdate2.timestamp()
381+
os.utime(file.get_Path(), (mdate2_ts,mdate2_ts))
378382

379-
withopen(file.get_Path(),"w")asf:
380-
f.write("BLA_BLA-BLA")
381-
f.flush()
382-
f.close()
383-
384-
mdate2=datetime.datetime.fromtimestamp(os.path.getmtime(file.get_Path()))
385-
logging.info("Last2 modification date is [{0}]".format(mdate2))
386-
assertmdate1!=mdate2
383+
mdate2c=datetime.datetime.fromtimestamp(os.path.getmtime(file.get_Path()))
384+
logging.info("Last2 modification date is [{0}]".format(mdate2c))
385+
assertmdate2==mdate2c
386+
assertmdate1!=mdate2c
387387

388388
cfg.SetOptionValue("port",321)
389389

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp