mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
restore build tests
Summary: A bad env var check meant these tests were not being run. Fix that, and fix the copyright test for the new message format. Reviewed By: patricklabatut Differential Revision: D29734562 fbshipit-source-id: a1a9bb68901b09c71c7b4ff81a04083febca8d50
This commit is contained in:
parent
bcee361d04
commit
9e8d91ebf9
@ -11,7 +11,7 @@ import numpy as np
|
||||
import plotly.graph_objects as go
|
||||
import torch
|
||||
from plotly.subplots import make_subplots
|
||||
from pytorch3d.renderer import TexturesVertex, RayBundle, ray_bundle_to_ray_points
|
||||
from pytorch3d.renderer import RayBundle, TexturesVertex, ray_bundle_to_ray_points
|
||||
from pytorch3d.renderer.camera_utils import camera_to_eye_at_up
|
||||
from pytorch3d.renderer.cameras import CamerasBase
|
||||
from pytorch3d.structures import Meshes, Pointclouds, join_meshes_as_scene
|
||||
|
@ -15,7 +15,7 @@ from common_testing import get_pytorch3d_dir, get_tests_dir
|
||||
# This file groups together tests which look at the code without running it.
|
||||
# When running the tests inside conda's build, the code is not available.
|
||||
in_conda_build = os.environ.get("CONDA_BUILD_STATE", "") == "TEST"
|
||||
in_re_worker = os.environ.get("INSIDE_RE_WORKER", "") is not None
|
||||
in_re_worker = os.environ.get("INSIDE_RE_WORKER") is not None
|
||||
|
||||
|
||||
class TestBuild(unittest.TestCase):
|
||||
@ -42,10 +42,7 @@ class TestBuild(unittest.TestCase):
|
||||
|
||||
extensions = ("py", "cu", "cuh", "cpp", "h", "hpp", "sh")
|
||||
|
||||
expect = (
|
||||
"Copyright (c) Facebook, Inc. and its affiliates."
|
||||
+ " All rights reserved.\n"
|
||||
)
|
||||
expect = "Copyright (c) Facebook, Inc. and its affiliates.\n"
|
||||
|
||||
files_missing_copyright_header = []
|
||||
|
||||
@ -59,7 +56,7 @@ class TestBuild(unittest.TestCase):
|
||||
continue
|
||||
with open(path) as f:
|
||||
firstline = f.readline()
|
||||
if firstline.startswith(("# -*-", "#!")):
|
||||
if firstline.startswith(("# -*-", "#!", "/*")):
|
||||
firstline = f.readline()
|
||||
if not firstline.endswith(expect):
|
||||
files_missing_copyright_header.append(str(path))
|
||||
|
Loading…
x
Reference in New Issue
Block a user