Skip to content

Commit 30af65c

Browse files
committed
Make test more reliable
- we cannot rely on the order of file descriptors - test had failed in a build
1 parent a4df61d commit 30af65c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyfakefs/tests/fake_open_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,8 @@ def test_file_descriptors_for_the_same_file_are_different(self):
558558
with self.open(second_path, encoding="utf8") as fake_file2:
559559
with self.open(first_path, encoding="utf8") as fake_file1a:
560560
fileno2 = fake_file2.fileno()
561-
self.assertGreater(fileno2, fake_file1.fileno())
562-
self.assertGreater(fake_file1a.fileno(), fileno2)
561+
self.assertNotEqual(fileno2, fake_file1.fileno())
562+
self.assertNotEqual(fake_file1a.fileno(), fileno2)
563563

564564
def test_reused_file_descriptors_do_not_affect_others(self):
565565
first_path = self.make_path("some_file1")

0 commit comments

Comments
 (0)