Skip to content

Commit

Permalink
Make test more reliable
Browse files Browse the repository at this point in the history
- we cannot rely on the order of file descriptors
- test had failed in a build
  • Loading branch information
mrbean-bremen committed Dec 11, 2024
1 parent a4df61d commit 30af65c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyfakefs/tests/fake_open_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ def test_file_descriptors_for_the_same_file_are_different(self):
with self.open(second_path, encoding="utf8") as fake_file2:
with self.open(first_path, encoding="utf8") as fake_file1a:
fileno2 = fake_file2.fileno()
self.assertGreater(fileno2, fake_file1.fileno())
self.assertGreater(fake_file1a.fileno(), fileno2)
self.assertNotEqual(fileno2, fake_file1.fileno())
self.assertNotEqual(fake_file1a.fileno(), fileno2)

def test_reused_file_descriptors_do_not_affect_others(self):
first_path = self.make_path("some_file1")
Expand Down

0 comments on commit 30af65c

Please sign in to comment.