Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Fix pytest unit test failure (#287)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #287

pytest-dev/pytest#3151

If there isn't a __init__.py file in a directory, pytest imports a test file into the global namespace. This means in a package structure not including __init__.py files, test files in separate directories with the same basename (filename not including directory) will overlap, and fortunately pytest fails with a visible error message rather than not executing the tests.

Reviewed By: Titousensei

Differential Revision: D14031515

fbshipit-source-id: dc0111b1fa62a630cf1be3da555632041ac7ba3c
  • Loading branch information
bethebunny authored and facebook-github-bot committed Feb 12, 2019
1 parent 71c31e1 commit a1b82c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pytext/data/test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

0 comments on commit a1b82c4

Please sign in to comment.