about summary refs log tree commit diff stats
path: root/html/broughlike
Commit message (Collapse)AuthorAgeFilesLines
* *elioat2024-12-021-36/+148
|
* *elioat2024-12-022-78/+81
|
* *elioat2024-11-241-1/+2
|
* *elioat2024-11-022-3/+75
|
* *elioat2024-11-011-25/+14
|
* *elioat2024-11-012-29/+52
|
* *elioat2024-10-311-1/+3
|
* *elioat2024-10-303-91/+93
|
* *elioat2024-10-302-821/+810
|
* *elioat2024-10-291-2/+11
|
* *elioat2024-10-271-1/+1
|
* *elioat2024-10-271-11/+6
|
* *elioat2024-10-271-0/+1
|
* *elioat2024-10-271-6/+27
|
* *elioat2024-10-271-0/+3
|
* *elioat2024-10-271-10/+2
|
* *elioat2024-10-271-7/+34
|
* *elioat2024-10-261-70/+35
|
* *elioat2024-10-261-2/+209
|
* *elioat2024-10-251-1/+1
|
* *elioat2024-10-251-1/+10
|
* *elioat2024-10-251-1/+50
|
* *elioat2024-10-251-1/+1
|
* *elioat2024-10-242-6/+20
|
* *elioat2024-10-241-2/+1
|
* *elioat2024-10-232-734/+92
|
* Merge branch 'master' of tilde.institute:~/public_repos/tourelioat2024-10-231-7/+30
|\
| * *elioat2024-10-211-2/+6
| |
| * *elioat2024-10-211-1/+3
| |
| * *elioat2024-10-211-2/+4
| |
| * *elioat2024-10-211-5/+20
| |
* | *elioat2024-10-231-0/+693
|/
* *elioat2024-10-201-1/+2
|
* *elioat2024-10-202-14/+60
|
* *elioat2024-10-201-0/+504
med_filenames: f = File(name) f.load() for dirfile in dir.files: if (f.path == dirfile.path and f.stat == dirfile.stat): break else: self.fail("couldn't find file {0}".format(name)) def test_nonexistant_dir(self): dir = Directory(NONEXISTANT_DIR) dir.load_content() self.assertTrue(dir.content_loaded) self.assertFalse(dir.exists) self.assertFalse(dir.accessible) self.assertEqual(dir.filenames, None) self.assertRaises(fsobject.NotLoadedYet, len, dir) def test_load_if_outdated(self): import os import time # modify the directory. If the time between the last modification # was within the filesystems resolution of mtime, we should have a reload def modify_dir(): open(TESTFILE, 'w').close() os.unlink(TESTFILE) def mtime(): return os.stat(TESTDIR).st_mtime dir = Directory(TESTDIR) dir.load() # If the modification happens to be in the same second as the # last modification, it will result in mtime having the same # integer value. So we wait until the resolution is exceeded # and mtime differs. old_mtime = mtime() for i in range(50): modify_dir() if old_mtime != mtime(): break time.sleep(0.1) else: # fail after 5 seconds of trying self.fail( "Cannot perform test: mtime of TESTDIR is not being updated.") self.assertTrue(dir.load_if_outdated()) if __name__ == '__main__': unittest.main()