bpo-36746: Create test for fcntl.lockf() by nanjekyejoannah · Pull Request #12999 · python/cpython (original) (raw)
I think your approach looks pretty good.
Have you considered using subprocess.run()
instead of os.fork()
? I think the former might be a better alternative especially if you are planning to increase test coverage of fcntl since it would make code reusing easier.
Also, while you are editing this file, could you please replace the following snippet
def test_main(): run_unittest(TestFcntl)
if name == 'main': test_main()
with
if name == 'main': unittest.main()