Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to Find File When Starting in Tests #225

Closed
brodieG opened this issue Jun 2, 2017 · 2 comments
Closed

Failing to Find File When Starting in Tests #225

brodieG opened this issue Jun 2, 2017 · 2 comments
Labels
Milestone

Comments

@brodieG
Copy link
Owner

@brodieG brodieG commented Jun 2, 2017

> setwd('tests')
> unitize('tests2')

Warning in infer_unitizer_location.character(test.file) :
  No possible matching files for tests2
Error in unitize_core(test.file.inf, list(store.id.inf), state = state,  : 
  Internal Error: `test.files` must all point to valid files in unitize mode; contact maintainer
In addition: Warning message:
In filename_to_storeid(test.file.inf) :
  Unable to translate file name 'tests2' to store id; please provide explicit store id
> setwd('..')
> unitize('tests2')

| Inferred test file location: tests/unitizer/tests2.R

| 6/6 tests passed; nothing to review.                                          

> getwd()
[1] "/Users/brodie/repos/unitizer"
@brodieG brodieG added the bug label Jun 2, 2017
@brodieG brodieG added this to the 1.4.4 milestone Jun 2, 2017
@brodieG
Copy link
Owner Author

@brodieG brodieG commented Jun 3, 2017

Loosely related, find files when they are not in tests directory is less than ideal:

> library(unitizer)
> unitize('empt')

Warning in infer_unitizer_location.character(test.file) :
  No possible matching files for empt
Error in unitize_core(test.file.inf, list(store.id.inf), state = state,  : 
  Internal Error: `test.files` must all point to valid files in unitize mode; contact maintainer
In addition: Warning message:
In filename_to_storeid(test.file.inf) :
  Unable to translate file name 'empt' to store id; please provide explicit store id
> list.files()
 [1] "covr.R"                 "DESCRIPTION"            "DEVNOTES.md"           
 [4] "empty.R"                "inst"                   "man"                   
 [7] "NAMESPACE"              "NEWS.md"                "R"                     
[10] "README.md"              "README.Rmd"             "scratch.R"             
[13] "src"                    "tests"                  "vetr_0.0.2.9007.tar.gz"
[16] "vignettes"             
> unitize('empty.R')

| 0/0 tests passed; nothing to review.                                          

> unitize('empty.R', force=T)

+------------------------------------------------------------------------------+
| unitizer for: ../empty.R                                                     |
+------------------------------------------------------------------------------+

Note the ../empty.R when that file is actually in the working directory.

@brodieG brodieG modified the milestones: 1.4.3, 1.4.4 Jun 4, 2017
@brodieG brodieG modified the milestones: 1.4.5, 1.4.4 Sep 2, 2017
@brodieG
Copy link
Owner Author

@brodieG brodieG commented Nov 23, 2017

We're not going to worry about the '../empty.R' issue.

@brodieG brodieG closed this in 3c0de8b Jan 6, 2018
brodieG added a commit that referenced this issue Jan 6, 2018
Fix #220, Fix #225, Fix #237, Fix #239, Fix #242, Fix #241
Fix #231, Fix #234, Fix #220, 'diffobj' wrapped in try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.