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

[Feature/refactor] Date Hack for tests is platform dependent #28

Open
netbe opened this issue Mar 20, 2015 · 3 comments
Open

[Feature/refactor] Date Hack for tests is platform dependent #28

netbe opened this issue Mar 20, 2015 · 3 comments

Comments

@netbe
Copy link
Contributor

netbe commented Mar 20, 2015

For #22 only,
Though the hack works well on linux platforms (I presume), on mac, unit tests will still fail because of different sed command arguments.

› nosetests                                                                                          11:22:23
................
Generate source codes with Project Prefix '' and suffix 'JSONObject'
Output path : './src'

read samples/product.json to parse ....
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

@S2MBO any ideas?

@S2MBO
Copy link

S2MBO commented Mar 20, 2015

Could you replace the -r option with -E in

os.system("find src -type f -exec sed -r --in-place \"s/%d/2014/g\" {} +" % (datetime.datetime.now().year, ) )
and see if it works for you? However, this would only be a OSX-only solution.

@netbe
Copy link
Contributor Author

netbe commented Mar 20, 2015

@S2MBO nope, can we go around that and not use sed?

@S2MBO
Copy link

S2MBO commented Mar 20, 2015

@netbe Does #29 solve your problem?

netbe added a commit that referenced this issue Apr 8, 2015
Improved test portability to fix #28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants